import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
data=pd.read_excel("Video Games.xlsx")
data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 92 | 93 | Star Wars Battlefront (2015) | PS4 | 2015 | Shooter | Electronic Arts | 2.93 | 3.29 | 0.22 | 1.23 | 7.67 |
| 93 | 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
| 95 | 96 | Crash Bandicoot 2: Cortex Strikes Back | PS | 1997 | Platform | Sony Computer Entertainment | 3.78 | 2.17 | 1.31 | 0.31 | 7.58 |
96 rows × 11 columns
data.shape
(96, 11)
data.head(5)
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
data.tail(5)
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 92 | 93 | Star Wars Battlefront (2015) | PS4 | 2015 | Shooter | Electronic Arts | 2.93 | 3.29 | 0.22 | 1.23 | 7.67 |
| 93 | 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
| 95 | 96 | Crash Bandicoot 2: Cortex Strikes Back | PS | 1997 | Platform | Sony Computer Entertainment | 3.78 | 2.17 | 1.31 | 0.31 | 7.58 |
data.columns
Index(['Rank', 'Name', 'Platform', 'Year', 'Genre', 'Publisher', 'NA_Sales',
'EU_Sales', 'JP_Sales', 'Other_Sales', 'Global_Sales'],
dtype='object')
data.dtypes
Rank int64 Name object Platform object Year int64 Genre object Publisher object NA_Sales float64 EU_Sales float64 JP_Sales float64 Other_Sales float64 Global_Sales float64 dtype: object
data.isnull()
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | False | False | False | False | False | False | False | False | False | False | False |
| 1 | False | False | False | False | False | False | False | False | False | False | False |
| 2 | False | False | False | False | False | False | False | False | False | False | False |
| 3 | False | False | False | False | False | False | False | False | False | False | False |
| 4 | False | False | False | False | False | False | False | False | False | False | False |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 91 | False | False | False | False | False | False | False | False | False | False | False |
| 92 | False | False | False | False | False | False | False | False | False | False | False |
| 93 | False | False | False | False | False | False | False | False | False | False | False |
| 94 | False | False | False | False | False | False | False | False | False | False | False |
| 95 | False | False | False | False | False | False | False | False | False | False | False |
96 rows × 11 columns
data.isnull().sum()
Rank 0 Name 0 Platform 0 Year 0 Genre 0 Publisher 0 NA_Sales 0 EU_Sales 0 JP_Sales 0 Other_Sales 0 Global_Sales 0 dtype: int64
data.ndim
2
data.index
RangeIndex(start=0, stop=96, step=1)
data.set_index('Rank')
| Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|
| Rank | ||||||||||
| 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 93 | Star Wars Battlefront (2015) | PS4 | 2015 | Shooter | Electronic Arts | 2.93 | 3.29 | 0.22 | 1.23 | 7.67 |
| 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
| 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
| 96 | Crash Bandicoot 2: Cortex Strikes Back | PS | 1997 | Platform | Sony Computer Entertainment | 3.78 | 2.17 | 1.31 | 0.31 | 7.58 |
96 rows × 10 columns
data.size
1056
data.empty
False
data.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 96 entries, 0 to 95 Data columns (total 11 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Rank 96 non-null int64 1 Name 96 non-null object 2 Platform 96 non-null object 3 Year 96 non-null int64 4 Genre 96 non-null object 5 Publisher 96 non-null object 6 NA_Sales 96 non-null float64 7 EU_Sales 96 non-null float64 8 JP_Sales 96 non-null float64 9 Other_Sales 96 non-null float64 10 Global_Sales 96 non-null float64 dtypes: float64(5), int64(2), object(4) memory usage: 8.4+ KB
data.describe()
| Rank | Year | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|
| count | 96.000000 | 96.000000 | 96.000000 | 96.000000 | 96.000000 | 96.000000 | 96.000000 |
| mean | 48.500000 | 2005.052083 | 7.157396 | 4.313542 | 2.098333 | 1.351771 | 14.920417 |
| std | 27.856777 | 7.728784 | 5.969033 | 3.543298 | 2.065092 | 1.581723 | 10.029910 |
| min | 1.000000 | 1982.000000 | 0.980000 | 0.010000 | 0.000000 | 0.080000 | 7.580000 |
| 25% | 24.750000 | 2001.000000 | 3.862500 | 2.410000 | 0.240000 | 0.572500 | 9.275000 |
| 50% | 48.500000 | 2007.000000 | 5.820000 | 3.430000 | 1.780000 | 0.895000 | 11.590000 |
| 75% | 72.250000 | 2011.000000 | 8.437500 | 5.060000 | 3.345000 | 1.622500 | 16.207500 |
| max | 96.000000 | 2015.000000 | 41.490000 | 29.020000 | 10.220000 | 10.570000 | 82.740000 |
data.describe(include="all")
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 96.000000 | 96 | 96 | 96.000000 | 96 | 96 | 96.000000 | 96.000000 | 96.000000 | 96.000000 | 96.000000 |
| unique | NaN | 87 | 17 | NaN | 11 | 11 | NaN | NaN | NaN | NaN | NaN |
| top | NaN | Grand Theft Auto V | Wii | NaN | Shooter | Nintendo | NaN | NaN | NaN | NaN | NaN |
| freq | NaN | 3 | 15 | NaN | 20 | 50 | NaN | NaN | NaN | NaN | NaN |
| mean | 48.500000 | NaN | NaN | 2005.052083 | NaN | NaN | 7.157396 | 4.313542 | 2.098333 | 1.351771 | 14.920417 |
| std | 27.856777 | NaN | NaN | 7.728784 | NaN | NaN | 5.969033 | 3.543298 | 2.065092 | 1.581723 | 10.029910 |
| min | 1.000000 | NaN | NaN | 1982.000000 | NaN | NaN | 0.980000 | 0.010000 | 0.000000 | 0.080000 | 7.580000 |
| 25% | 24.750000 | NaN | NaN | 2001.000000 | NaN | NaN | 3.862500 | 2.410000 | 0.240000 | 0.572500 | 9.275000 |
| 50% | 48.500000 | NaN | NaN | 2007.000000 | NaN | NaN | 5.820000 | 3.430000 | 1.780000 | 0.895000 | 11.590000 |
| 75% | 72.250000 | NaN | NaN | 2011.000000 | NaN | NaN | 8.437500 | 5.060000 | 3.345000 | 1.622500 | 16.207500 |
| max | 96.000000 | NaN | NaN | 2015.000000 | NaN | NaN | 41.490000 | 29.020000 | 10.220000 | 10.570000 | 82.740000 |
data.corr()
| Rank | Year | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|
| Rank | 1.000000 | 0.127289 | -0.657309 | -0.537946 | -0.462587 | -0.399986 | -0.739582 |
| Year | 0.127289 | 1.000000 | -0.327936 | 0.192512 | -0.336856 | 0.211917 | -0.163147 |
| NA_Sales | -0.657309 | -0.327936 | 1.000000 | 0.564505 | 0.248103 | 0.355117 | 0.901666 |
| EU_Sales | -0.537946 | 0.192512 | 0.564505 | 1.000000 | 0.252680 | 0.498915 | 0.819937 |
| JP_Sales | -0.462587 | -0.336856 | 0.248103 | 0.252680 | 1.000000 | -0.053579 | 0.434380 |
| Other_Sales | -0.399986 | 0.211917 | 0.355117 | 0.498915 | -0.053579 | 1.000000 | 0.534322 |
| Global_Sales | -0.739582 | -0.163147 | 0.901666 | 0.819937 | 0.434380 | 0.534322 | 1.000000 |
plt.figure(figsize=(10,8))
sns.heatmap(data.corr(), annot=True,linewidth=.5,center=0,cmap='coolwarm')
<AxesSubplot:>
data.duplicated()
0 False
1 False
2 False
3 False
4 False
...
91 False
92 False
93 False
94 False
95 False
Length: 96, dtype: bool
data.duplicated().sum()
0
data.nunique()
Rank 96 Name 87 Platform 17 Year 27 Genre 11 Publisher 11 NA_Sales 91 EU_Sales 91 JP_Sales 82 Other_Sales 79 Global_Sales 92 dtype: int64
data.Name.unique()
array(['Wii Sports', 'Super Mario Bros.', 'Mario Kart Wii',
'Wii Sports Resort', 'Pokemon Red/Pokemon Blue', 'Tetris',
'New Super Mario Bros.', 'Wii Play', 'New Super Mario Bros. Wii',
'Duck Hunt', 'Nintendogs', 'Mario Kart DS',
'Pokemon Gold/Pokemon Silver', 'Wii Fit', 'Wii Fit Plus',
'Kinect Adventures!', 'Grand Theft Auto V',
'Grand Theft Auto: San Andreas', 'Super Mario World', 'Brain Age',
'Pokemon Diamond/Pokemon Pearl', 'Super Mario Land',
'Super Mario Bros. 3', 'Grand Theft Auto: Vice City',
'Pokemon Ruby/Pokemon Sapphire', 'Pokemon Black/Pokemon White',
'Brain Age 2: More Training in Minutes a Day',
'Gran Turismo 3: A-Spec', 'Call of Duty: Modern Warfare 3',
'Pokémon Yellow: Special Pikachu Edition',
'Call of Duty: Black Ops', 'Pokemon X/Pokemon Y',
'Call of Duty: Black Ops 3', 'Call of Duty: Black Ops II',
'Call of Duty: Modern Warfare 2', 'Grand Theft Auto III',
'Super Smash Bros. Brawl', 'Animal Crossing: Wild World',
'Mario Kart 7', 'Halo 3', 'Pokemon HeartGold/Pokemon SoulSilver',
'Super Mario 64', 'Gran Turismo 4', 'Super Mario Galaxy',
'Pokemon Omega Ruby/Pokemon Alpha Sapphire',
'Super Mario Land 2: 6 Golden Coins', 'Grand Theft Auto IV',
'Gran Turismo', 'Super Mario 3D Land', 'Gran Turismo 5',
'Super Mario All-Stars', 'Pokemon FireRed/Pokemon LeafGreen',
'Just Dance 3', 'Call of Duty: Ghosts', 'Halo: Reach',
'Mario Kart 64', 'New Super Mario Bros. 2', 'Halo 4',
'Final Fantasy VII', 'Just Dance 2', 'Gran Turismo 2',
'Call of Duty 4: Modern Warfare', 'Donkey Kong Country',
'Minecraft', 'Animal Crossing: New Leaf', 'Mario Party DS',
'The Elder Scrolls V: Skyrim', 'Super Mario Kart', 'FIFA 16',
'Wii Party', 'Halo 2', 'Mario Party 8',
'Pokemon Black 2/Pokemon White 2', 'FIFA Soccer 13', 'The Sims 3',
'GoldenEye 007', 'Mario & Sonic at the Olympic Games',
'Final Fantasy X', 'Final Fantasy VIII',
'Pokémon Platinum Version', 'Pac-Man',
'Grand Theft Auto: Liberty City Stories', 'Super Mario Galaxy 2',
'Star Wars Battlefront (2015)', 'Call of Duty: Advanced Warfare',
'The Legend of Zelda: Ocarina of Time',
'Crash Bandicoot 2: Cortex Strikes Back'], dtype=object)
data.Name.value_counts()
Grand Theft Auto V 3
Call of Duty: Modern Warfare 3 2
Grand Theft Auto IV 2
Call of Duty: Black Ops 2
Call of Duty: Ghosts 2
..
Pokémon Platinum Version 1
Grand Theft Auto III 1
Super Smash Bros. Brawl 1
Animal Crossing: New Leaf 1
Gran Turismo 2 1
Name: Name, Length: 87, dtype: int64
plt.figure(figsize=(15,3))
sns.countplot(data["Name"])
plt.xticks(rotation=90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86]),
[Text(0, 0, 'Wii Sports'),
Text(1, 0, 'Super Mario Bros.'),
Text(2, 0, 'Mario Kart Wii'),
Text(3, 0, 'Wii Sports Resort'),
Text(4, 0, 'Pokemon Red/Pokemon Blue'),
Text(5, 0, 'Tetris'),
Text(6, 0, 'New Super Mario Bros.'),
Text(7, 0, 'Wii Play'),
Text(8, 0, 'New Super Mario Bros. Wii'),
Text(9, 0, 'Duck Hunt'),
Text(10, 0, 'Nintendogs'),
Text(11, 0, 'Mario Kart DS'),
Text(12, 0, 'Pokemon Gold/Pokemon Silver'),
Text(13, 0, 'Wii Fit'),
Text(14, 0, 'Wii Fit Plus'),
Text(15, 0, 'Kinect Adventures!'),
Text(16, 0, 'Grand Theft Auto V'),
Text(17, 0, 'Grand Theft Auto: San Andreas'),
Text(18, 0, 'Super Mario World'),
Text(19, 0, 'Brain Age'),
Text(20, 0, 'Pokemon Diamond/Pokemon Pearl'),
Text(21, 0, 'Super Mario Land'),
Text(22, 0, 'Super Mario Bros. 3'),
Text(23, 0, 'Grand Theft Auto: Vice City'),
Text(24, 0, 'Pokemon Ruby/Pokemon Sapphire'),
Text(25, 0, 'Pokemon Black/Pokemon White'),
Text(26, 0, 'Brain Age 2: More Training in Minutes a Day'),
Text(27, 0, 'Gran Turismo 3: A-Spec'),
Text(28, 0, 'Call of Duty: Modern Warfare 3'),
Text(29, 0, 'Pokémon Yellow: Special Pikachu Edition'),
Text(30, 0, 'Call of Duty: Black Ops'),
Text(31, 0, 'Pokemon X/Pokemon Y'),
Text(32, 0, 'Call of Duty: Black Ops 3'),
Text(33, 0, 'Call of Duty: Black Ops II'),
Text(34, 0, 'Call of Duty: Modern Warfare 2'),
Text(35, 0, 'Grand Theft Auto III'),
Text(36, 0, 'Super Smash Bros. Brawl'),
Text(37, 0, 'Animal Crossing: Wild World'),
Text(38, 0, 'Mario Kart 7'),
Text(39, 0, 'Halo 3'),
Text(40, 0, 'Pokemon HeartGold/Pokemon SoulSilver'),
Text(41, 0, 'Super Mario 64'),
Text(42, 0, 'Gran Turismo 4'),
Text(43, 0, 'Super Mario Galaxy'),
Text(44, 0, 'Pokemon Omega Ruby/Pokemon Alpha Sapphire'),
Text(45, 0, 'Super Mario Land 2: 6 Golden Coins'),
Text(46, 0, 'Grand Theft Auto IV'),
Text(47, 0, 'Gran Turismo'),
Text(48, 0, 'Super Mario 3D Land'),
Text(49, 0, 'Gran Turismo 5'),
Text(50, 0, 'Super Mario All-Stars'),
Text(51, 0, 'Pokemon FireRed/Pokemon LeafGreen'),
Text(52, 0, 'Just Dance 3'),
Text(53, 0, 'Call of Duty: Ghosts'),
Text(54, 0, 'Halo: Reach'),
Text(55, 0, 'Mario Kart 64'),
Text(56, 0, 'New Super Mario Bros. 2'),
Text(57, 0, 'Halo 4'),
Text(58, 0, 'Final Fantasy VII'),
Text(59, 0, 'Just Dance 2'),
Text(60, 0, 'Gran Turismo 2'),
Text(61, 0, 'Call of Duty 4: Modern Warfare'),
Text(62, 0, 'Donkey Kong Country'),
Text(63, 0, 'Minecraft'),
Text(64, 0, 'Animal Crossing: New Leaf'),
Text(65, 0, 'Mario Party DS'),
Text(66, 0, 'The Elder Scrolls V: Skyrim'),
Text(67, 0, 'Super Mario Kart'),
Text(68, 0, 'FIFA 16'),
Text(69, 0, 'Wii Party'),
Text(70, 0, 'Halo 2'),
Text(71, 0, 'Mario Party 8'),
Text(72, 0, 'Pokemon Black 2/Pokemon White 2'),
Text(73, 0, 'FIFA Soccer 13'),
Text(74, 0, 'The Sims 3'),
Text(75, 0, 'GoldenEye 007'),
Text(76, 0, 'Mario & Sonic at the Olympic Games'),
Text(77, 0, 'Final Fantasy X'),
Text(78, 0, 'Final Fantasy VIII'),
Text(79, 0, 'Pokémon Platinum Version'),
Text(80, 0, 'Pac-Man'),
Text(81, 0, 'Grand Theft Auto: Liberty City Stories'),
Text(82, 0, 'Super Mario Galaxy 2'),
Text(83, 0, 'Star Wars Battlefront (2015)'),
Text(84, 0, 'Call of Duty: Advanced Warfare'),
Text(85, 0, 'The Legend of Zelda: Ocarina of Time'),
Text(86, 0, 'Crash Bandicoot 2: Cortex Strikes Back')])
data.sample(5)
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 85 | 86 | Mario & Sonic at the Olympic Games | Wii | 2007 | Sports | Sega | 2.58 | 3.90 | 0.66 | 0.91 | 8.06 |
| 89 | 90 | Pac-Man | 2600 | 1982 | Puzzle | Atari | 7.28 | 0.45 | 0.00 | 0.08 | 7.81 |
| 48 | 49 | Super Mario Galaxy | Wii | 2007 | Platform | Nintendo | 6.16 | 3.40 | 1.20 | 0.76 | 11.52 |
plt.figure(figsize=(17,3))
plt.bar(data['Name'],data['Global_Sales'],color='r')
plt.title('Games and Global_Sales',fontsize=15,color='green')
plt.xlabel("Name",fontsize=10,color='black')
plt.xticks(rotation=90)
plt.ylabel("Global_Sales",fontsize=10,color='black')
plt.grid(True)
plt.show()
tp=data.groupby("Publisher")["Global_Sales"].sum().to_frame(name='Sales')
tp.sort_values(by='Sales',ascending=False)[0:20].plot.bar()
<AxesSubplot:xlabel='Publisher'>
data['Genre'].unique()
array(['Sports', 'Platform', 'Racing', 'Role-Playing', 'Puzzle', 'Misc',
'Shooter', 'Simulation', 'Action', 'Fighting', 'Adventure'],
dtype=object)
data.sort_values("Genre").head()
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 45 | 46 | Pokemon HeartGold/Pokemon SoulSilver | DS | 2009 | Action | Nintendo | 4.40 | 2.77 | 3.96 | 0.77 | 11.90 |
| 24 | 25 | Grand Theft Auto: Vice City | PS2 | 2002 | Action | Take-Two Interactive | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
| 90 | 91 | Grand Theft Auto: Liberty City Stories | PSP | 2005 | Action | Take-Two Interactive | 2.90 | 2.83 | 0.24 | 1.75 | 7.72 |
| 23 | 24 | Grand Theft Auto V | X360 | 2013 | Action | Take-Two Interactive | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 |
data.sort_values('Global_Sales',ascending=False).head()
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
data['Global_Sales'].mean()
14.920416666666656
less_global=data[data['Global_Sales']<data['Global_Sales'].mean()]
less_global
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 29 | 30 | Call of Duty: Modern Warfare 3 | X360 | 2011 | Shooter | Activision | 9.03 | 4.28 | 0.13 | 1.32 | 14.76 |
| 30 | 31 | Pokémon Yellow: Special Pikachu Edition | GB | 1998 | Role-Playing | Nintendo | 5.89 | 5.04 | 3.12 | 0.59 | 14.64 |
| 31 | 32 | Call of Duty: Black Ops | X360 | 2010 | Shooter | Activision | 9.67 | 3.73 | 0.11 | 1.13 | 14.64 |
| 32 | 33 | Pokemon X/Pokemon Y | 3DS | 2013 | Role-Playing | Nintendo | 5.17 | 4.05 | 4.34 | 0.79 | 14.35 |
| 33 | 34 | Call of Duty: Black Ops 3 | PS4 | 2015 | Shooter | Activision | 5.77 | 5.81 | 0.35 | 2.31 | 14.24 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 92 | 93 | Star Wars Battlefront (2015) | PS4 | 2015 | Shooter | Electronic Arts | 2.93 | 3.29 | 0.22 | 1.23 | 7.67 |
| 93 | 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
| 95 | 96 | Crash Bandicoot 2: Cortex Strikes Back | PS | 1997 | Platform | Sony Computer Entertainment | 3.78 | 2.17 | 1.31 | 0.31 | 7.58 |
67 rows × 11 columns
plt.figure(figsize=(15,3))
plt.bar(less_global['Name'],less_global['Global_Sales'],color='Grey')
plt.xlabel('Name')
plt.ylabel('Global_Sales')
plt.title('Games Below Average of Global Sales')
plt.xticks(rotation=90)
plt.show()
d1=pd.DataFrame(less_global)
d1
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 29 | 30 | Call of Duty: Modern Warfare 3 | X360 | 2011 | Shooter | Activision | 9.03 | 4.28 | 0.13 | 1.32 | 14.76 |
| 30 | 31 | Pokémon Yellow: Special Pikachu Edition | GB | 1998 | Role-Playing | Nintendo | 5.89 | 5.04 | 3.12 | 0.59 | 14.64 |
| 31 | 32 | Call of Duty: Black Ops | X360 | 2010 | Shooter | Activision | 9.67 | 3.73 | 0.11 | 1.13 | 14.64 |
| 32 | 33 | Pokemon X/Pokemon Y | 3DS | 2013 | Role-Playing | Nintendo | 5.17 | 4.05 | 4.34 | 0.79 | 14.35 |
| 33 | 34 | Call of Duty: Black Ops 3 | PS4 | 2015 | Shooter | Activision | 5.77 | 5.81 | 0.35 | 2.31 | 14.24 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 92 | 93 | Star Wars Battlefront (2015) | PS4 | 2015 | Shooter | Electronic Arts | 2.93 | 3.29 | 0.22 | 1.23 | 7.67 |
| 93 | 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
| 95 | 96 | Crash Bandicoot 2: Cortex Strikes Back | PS | 1997 | Platform | Sony Computer Entertainment | 3.78 | 2.17 | 1.31 | 0.31 | 7.58 |
67 rows × 11 columns
d=less_global['Genre'].value_counts()
d
Shooter 19 Role-Playing 10 Platform 9 Action 8 Racing 7 Misc 6 Simulation 3 Sports 2 Puzzle 1 Fighting 1 Adventure 1 Name: Genre, dtype: int64
greater_global=data[data['Global_Sales']>data['Global_Sales'].mean()]
greater_global
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 5 | 6 | Tetris | GB | 1989 | Puzzle | Nintendo | 23.20 | 2.26 | 4.22 | 0.58 | 30.26 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 9 | 10 | Duck Hunt | NES | 1984 | Shooter | Nintendo | 26.93 | 0.63 | 0.28 | 0.47 | 28.31 |
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 11 | 12 | Mario Kart DS | DS | 2005 | Racing | Nintendo | 9.81 | 7.57 | 4.13 | 1.92 | 23.42 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 15 | 16 | Kinect Adventures! | X360 | 2010 | Misc | Microsoft Game Studios | 14.97 | 4.94 | 0.24 | 1.67 | 21.82 |
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 17 | 18 | Grand Theft Auto: San Andreas | PS2 | 2004 | Action | Take-Two Interactive | 9.43 | 0.40 | 0.41 | 10.57 | 20.81 |
| 18 | 19 | Super Mario World | SNES | 1990 | Platform | Nintendo | 12.78 | 3.75 | 3.54 | 0.55 | 20.61 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
| 21 | 22 | Super Mario Land | GB | 1989 | Platform | Nintendo | 10.83 | 2.71 | 4.18 | 0.42 | 18.14 |
| 22 | 23 | Super Mario Bros. 3 | NES | 1988 | Platform | Nintendo | 9.54 | 3.44 | 3.84 | 0.46 | 17.28 |
| 23 | 24 | Grand Theft Auto V | X360 | 2013 | Action | Take-Two Interactive | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 |
| 24 | 25 | Grand Theft Auto: Vice City | PS2 | 2002 | Action | Take-Two Interactive | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 |
| 25 | 26 | Pokemon Ruby/Pokemon Sapphire | GBA | 2002 | Role-Playing | Nintendo | 6.06 | 3.90 | 5.38 | 0.50 | 15.85 |
| 26 | 27 | Pokemon Black/Pokemon White | DS | 2010 | Role-Playing | Nintendo | 5.57 | 3.28 | 5.65 | 0.82 | 15.32 |
| 27 | 28 | Brain Age 2: More Training in Minutes a Day | DS | 2005 | Puzzle | Nintendo | 3.44 | 5.36 | 5.32 | 1.18 | 15.30 |
| 28 | 29 | Gran Turismo 3: A-Spec | PS2 | 2001 | Racing | Sony Computer Entertainment | 6.85 | 5.09 | 1.87 | 1.16 | 14.98 |
plt.figure(figsize=(15,3))
plt.bar(greater_global['Name'],greater_global['Global_Sales'],color='Pink')
plt.xlabel('Name')
plt.ylabel('Global_Sales')
plt.title('Games Above Average of Global Sales')
plt.xticks(rotation=90)
plt.show()
greater_global['Genre'].value_counts()
Platform 6 Role-Playing 5 Action 4 Sports 4 Misc 3 Racing 3 Puzzle 2 Shooter 1 Simulation 1 Name: Genre, dtype: int64
plt.figure(figsize=(16,18))
sns.relplot(x="NA_Sales",y="Global_Sales",hue='Platform',data=data)
plt.show()
<Figure size 1152x1296 with 0 Axes>
top_US =data[['Name','Platform','Year','Genre','Publisher','NA_Sales']].sort_values(by = 'NA_Sales', ascending=False)
top_Genres=top_US.groupby('Genre')['NA_Sales'].sum().to_frame(name='NA').sort_values(by='NA',ascending=False)
print(top_Genres)
NA Genre Shooter 146.37 Platform 132.69 Sports 78.96 Role-Playing 76.91 Action 69.25 Misc 61.28 Racing 60.21 Puzzle 33.92 Simulation 14.61 Fighting 6.75 Adventure 6.16
data.sort_values('NA_Sales',ascending=False).head(5)
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 9 | 10 | Duck Hunt | NES | 1984 | Shooter | Nintendo | 26.93 | 0.63 | 0.28 | 0.47 | 28.31 |
| 5 | 6 | Tetris | GB | 1989 | Puzzle | Nintendo | 23.20 | 2.26 | 4.22 | 0.58 | 30.26 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
data['NA_Sales'].mean()
7.157395833333332
greater_NA=data[data['NA_Sales']>data['NA_Sales'].mean()]
greater_NA
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 5 | 6 | Tetris | GB | 1989 | Puzzle | Nintendo | 23.20 | 2.26 | 4.22 | 0.58 | 30.26 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 9 | 10 | Duck Hunt | NES | 1984 | Shooter | Nintendo | 26.93 | 0.63 | 0.28 | 0.47 | 28.31 |
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 11 | 12 | Mario Kart DS | DS | 2005 | Racing | Nintendo | 9.81 | 7.57 | 4.13 | 1.92 | 23.42 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 15 | 16 | Kinect Adventures! | X360 | 2010 | Misc | Microsoft Game Studios | 14.97 | 4.94 | 0.24 | 1.67 | 21.82 |
| 17 | 18 | Grand Theft Auto: San Andreas | PS2 | 2004 | Action | Take-Two Interactive | 9.43 | 0.40 | 0.41 | 10.57 | 20.81 |
| 18 | 19 | Super Mario World | SNES | 1990 | Platform | Nintendo | 12.78 | 3.75 | 3.54 | 0.55 | 20.61 |
| 21 | 22 | Super Mario Land | GB | 1989 | Platform | Nintendo | 10.83 | 2.71 | 4.18 | 0.42 | 18.14 |
| 22 | 23 | Super Mario Bros. 3 | NES | 1988 | Platform | Nintendo | 9.54 | 3.44 | 3.84 | 0.46 | 17.28 |
| 23 | 24 | Grand Theft Auto V | X360 | 2013 | Action | Take-Two Interactive | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 |
| 24 | 25 | Grand Theft Auto: Vice City | PS2 | 2002 | Action | Take-Two Interactive | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 |
| 29 | 30 | Call of Duty: Modern Warfare 3 | X360 | 2011 | Shooter | Activision | 9.03 | 4.28 | 0.13 | 1.32 | 14.76 |
| 31 | 32 | Call of Duty: Black Ops | X360 | 2010 | Shooter | Activision | 9.67 | 3.73 | 0.11 | 1.13 | 14.64 |
| 35 | 36 | Call of Duty: Black Ops II | X360 | 2012 | Shooter | Activision | 8.25 | 4.30 | 0.07 | 1.12 | 13.73 |
| 36 | 37 | Call of Duty: Modern Warfare 2 | X360 | 2009 | Shooter | Activision | 8.52 | 3.63 | 0.08 | 1.29 | 13.51 |
| 43 | 44 | Halo 3 | X360 | 2007 | Shooter | Microsoft Game Studios | 7.97 | 2.83 | 0.13 | 1.21 | 12.14 |
| 89 | 90 | Pac-Man | 2600 | 1982 | Puzzle | Atari | 7.28 | 0.45 | 0.00 | 0.08 | 7.81 |
plt.figure(figsize=(15,3))
plt.bar(greater_NA['Name'],greater_NA['Global_Sales'],color='Cyan')
plt.xlabel('Name')
plt.ylabel('Global_Sales')
plt.title('Games Above Average of Global Sales in NA')
plt.xticks(rotation=90)
plt.show()
greater_NA['Genre'].value_counts()
Platform 6 Shooter 6 Sports 4 Action 3 Puzzle 2 Role-Playing 2 Misc 2 Racing 2 Simulation 1 Name: Genre, dtype: int64
less_NA=data[data['NA_Sales']<data['NA_Sales'].mean()]
less_NA
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
| 25 | 26 | Pokemon Ruby/Pokemon Sapphire | GBA | 2002 | Role-Playing | Nintendo | 6.06 | 3.90 | 5.38 | 0.50 | 15.85 |
| 26 | 27 | Pokemon Black/Pokemon White | DS | 2010 | Role-Playing | Nintendo | 5.57 | 3.28 | 5.65 | 0.82 | 15.32 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 92 | 93 | Star Wars Battlefront (2015) | PS4 | 2015 | Shooter | Electronic Arts | 2.93 | 3.29 | 0.22 | 1.23 | 7.67 |
| 93 | 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
| 95 | 96 | Crash Bandicoot 2: Cortex Strikes Back | PS | 1997 | Platform | Sony Computer Entertainment | 3.78 | 2.17 | 1.31 | 0.31 | 7.58 |
68 rows × 11 columns
plt.figure(figsize=(15,3))
plt.bar(less_NA['Name'],less_NA['Global_Sales'],color='Green')
plt.xlabel('Name')
plt.ylabel('Global_Sales')
plt.title('Games Below Average of Global Sales in NA')
plt.xticks(rotation=90)
plt.show()
less_NA['Genre'].value_counts()
Shooter 14 Role-Playing 13 Action 9 Platform 9 Racing 8 Misc 7 Simulation 3 Sports 2 Puzzle 1 Fighting 1 Adventure 1 Name: Genre, dtype: int64
top_EU=data[['Name','Platform','Year','Genre','Publisher','EU_Sales']].sort_values(by = 'EU_Sales', ascending=False)
top_EU_genres=top_EU.groupby('Genre')['EU_Sales'].sum().to_frame(name='EU').sort_values(by='EU',ascending=False)
print(top_EU_genres)
EU Genre Shooter 68.25 Sports 66.61 Role-Playing 54.64 Platform 53.64 Action 50.19 Racing 44.81 Misc 39.98 Simulation 23.26 Puzzle 8.07 Fighting 2.61 Adventure 2.04
data.sort_values('EU_Sales',ascending=False).head()
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
data['EU_Sales'].mean()
4.3135416666666675
greater_EU=data[data['EU_Sales']>data['EU_Sales'].mean()]
greater_EU
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 11 | 12 | Mario Kart DS | DS | 2005 | Racing | Nintendo | 9.81 | 7.57 | 4.13 | 1.92 | 23.42 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 15 | 16 | Kinect Adventures! | X360 | 2010 | Misc | Microsoft Game Studios | 14.97 | 4.94 | 0.24 | 1.67 | 21.82 |
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
| 23 | 24 | Grand Theft Auto V | X360 | 2013 | Action | Take-Two Interactive | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 |
| 24 | 25 | Grand Theft Auto: Vice City | PS2 | 2002 | Action | Take-Two Interactive | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 |
| 27 | 28 | Brain Age 2: More Training in Minutes a Day | DS | 2005 | Puzzle | Nintendo | 3.44 | 5.36 | 5.32 | 1.18 | 15.30 |
| 28 | 29 | Gran Turismo 3: A-Spec | PS2 | 2001 | Racing | Sony Computer Entertainment | 6.85 | 5.09 | 1.87 | 1.16 | 14.98 |
| 30 | 31 | Pokémon Yellow: Special Pikachu Edition | GB | 1998 | Role-Playing | Nintendo | 5.89 | 5.04 | 3.12 | 0.59 | 14.64 |
| 33 | 34 | Call of Duty: Black Ops 3 | PS4 | 2015 | Shooter | Activision | 5.77 | 5.81 | 0.35 | 2.31 | 14.24 |
| 34 | 35 | Call of Duty: Black Ops II | PS3 | 2012 | Shooter | Activision | 4.99 | 5.88 | 0.65 | 2.52 | 14.03 |
| 37 | 38 | Call of Duty: Modern Warfare 3 | PS3 | 2011 | Shooter | Activision | 5.54 | 5.82 | 0.49 | 1.62 | 13.46 |
| 38 | 39 | Grand Theft Auto III | PS2 | 2001 | Action | Take-Two Interactive | 6.99 | 4.51 | 0.30 | 1.30 | 13.10 |
| 40 | 41 | Call of Duty: Black Ops | PS3 | 2010 | Shooter | Activision | 5.98 | 4.44 | 0.48 | 1.83 | 12.73 |
| 44 | 45 | Grand Theft Auto V | PS4 | 2014 | Action | Take-Two Interactive | 3.80 | 5.81 | 0.36 | 2.02 | 11.98 |
| 54 | 55 | Gran Turismo 5 | PS3 | 2010 | Racing | Sony Computer Entertainment | 2.96 | 4.88 | 0.81 | 2.12 | 10.77 |
| 77 | 78 | FIFA 16 | PS4 | 2015 | Sports | Electronic Arts | 1.11 | 6.06 | 0.06 | 1.26 | 8.49 |
| 82 | 83 | FIFA Soccer 13 | PS3 | 2012 | Action | Electronic Arts | 1.06 | 5.05 | 0.13 | 2.01 | 8.24 |
| 83 | 84 | The Sims 3 | PC | 2009 | Simulation | Electronic Arts | 0.98 | 6.42 | 0.00 | 0.71 | 8.11 |
plt.figure(figsize=(15,3))
sns.lineplot(x='Name',y='EU_Sales',data=greater_EU)
plt.xticks(rotation=80)
plt.title('Games Above Average of Europe Sales')
plt.show()
greater_EU['Genre'].value_counts()
Action 6 Sports 5 Role-Playing 4 Shooter 4 Racing 4 Misc 3 Platform 2 Simulation 2 Puzzle 1 Name: Genre, dtype: int64
less_EU=data[data['EU_Sales']>data['EU_Sales'].mean()]
less_EU
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 11 | 12 | Mario Kart DS | DS | 2005 | Racing | Nintendo | 9.81 | 7.57 | 4.13 | 1.92 | 23.42 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 15 | 16 | Kinect Adventures! | X360 | 2010 | Misc | Microsoft Game Studios | 14.97 | 4.94 | 0.24 | 1.67 | 21.82 |
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
| 23 | 24 | Grand Theft Auto V | X360 | 2013 | Action | Take-Two Interactive | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 |
| 24 | 25 | Grand Theft Auto: Vice City | PS2 | 2002 | Action | Take-Two Interactive | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 |
| 27 | 28 | Brain Age 2: More Training in Minutes a Day | DS | 2005 | Puzzle | Nintendo | 3.44 | 5.36 | 5.32 | 1.18 | 15.30 |
| 28 | 29 | Gran Turismo 3: A-Spec | PS2 | 2001 | Racing | Sony Computer Entertainment | 6.85 | 5.09 | 1.87 | 1.16 | 14.98 |
| 30 | 31 | Pokémon Yellow: Special Pikachu Edition | GB | 1998 | Role-Playing | Nintendo | 5.89 | 5.04 | 3.12 | 0.59 | 14.64 |
| 33 | 34 | Call of Duty: Black Ops 3 | PS4 | 2015 | Shooter | Activision | 5.77 | 5.81 | 0.35 | 2.31 | 14.24 |
| 34 | 35 | Call of Duty: Black Ops II | PS3 | 2012 | Shooter | Activision | 4.99 | 5.88 | 0.65 | 2.52 | 14.03 |
| 37 | 38 | Call of Duty: Modern Warfare 3 | PS3 | 2011 | Shooter | Activision | 5.54 | 5.82 | 0.49 | 1.62 | 13.46 |
| 38 | 39 | Grand Theft Auto III | PS2 | 2001 | Action | Take-Two Interactive | 6.99 | 4.51 | 0.30 | 1.30 | 13.10 |
| 40 | 41 | Call of Duty: Black Ops | PS3 | 2010 | Shooter | Activision | 5.98 | 4.44 | 0.48 | 1.83 | 12.73 |
| 44 | 45 | Grand Theft Auto V | PS4 | 2014 | Action | Take-Two Interactive | 3.80 | 5.81 | 0.36 | 2.02 | 11.98 |
| 54 | 55 | Gran Turismo 5 | PS3 | 2010 | Racing | Sony Computer Entertainment | 2.96 | 4.88 | 0.81 | 2.12 | 10.77 |
| 77 | 78 | FIFA 16 | PS4 | 2015 | Sports | Electronic Arts | 1.11 | 6.06 | 0.06 | 1.26 | 8.49 |
| 82 | 83 | FIFA Soccer 13 | PS3 | 2012 | Action | Electronic Arts | 1.06 | 5.05 | 0.13 | 2.01 | 8.24 |
| 83 | 84 | The Sims 3 | PC | 2009 | Simulation | Electronic Arts | 0.98 | 6.42 | 0.00 | 0.71 | 8.11 |
plt.figure(figsize=(15,3))
sns.lineplot(x='Name',y='EU_Sales',data=less_EU,color='red')
plt.xticks(rotation=80)
plt.title('Games Below Average of Europe Sales')
plt.show()
less_EU['Genre'].value_counts()
Action 6 Sports 5 Role-Playing 4 Shooter 4 Racing 4 Misc 3 Platform 2 Simulation 2 Puzzle 1 Name: Genre, dtype: int64
top_JP=data[['Name','Platform','Year','Genre','Publisher','JP_Sales']].sort_values(by = 'JP_Sales', ascending=False)
top_JP_genres=top_JP.groupby('Genre')['JP_Sales'].sum().to_frame(name='JP').sort_values(by='JP',ascending=False)
print(top_JP_genres)
JP Genre Role-Playing 63.75 Platform 45.94 Racing 24.64 Sports 13.90 Misc 13.41 Simulation 11.62 Puzzle 9.54 Action 8.93 Shooter 4.36 Adventure 2.69 Fighting 2.66
data.sort_values('JP_Sales',ascending=False).head()
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
data['JP_Sales'].mean()
2.0983333333333323
greater_JP=data[data['JP_Sales']>data['JP_Sales'].mean()]
greater_JP
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 5 | 6 | Tetris | GB | 1989 | Puzzle | Nintendo | 23.20 | 2.26 | 4.22 | 0.58 | 30.26 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 11 | 12 | Mario Kart DS | DS | 2005 | Racing | Nintendo | 9.81 | 7.57 | 4.13 | 1.92 | 23.42 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 18 | 19 | Super Mario World | SNES | 1990 | Platform | Nintendo | 12.78 | 3.75 | 3.54 | 0.55 | 20.61 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
| 21 | 22 | Super Mario Land | GB | 1989 | Platform | Nintendo | 10.83 | 2.71 | 4.18 | 0.42 | 18.14 |
| 22 | 23 | Super Mario Bros. 3 | NES | 1988 | Platform | Nintendo | 9.54 | 3.44 | 3.84 | 0.46 | 17.28 |
| 25 | 26 | Pokemon Ruby/Pokemon Sapphire | GBA | 2002 | Role-Playing | Nintendo | 6.06 | 3.90 | 5.38 | 0.50 | 15.85 |
| 26 | 27 | Pokemon Black/Pokemon White | DS | 2010 | Role-Playing | Nintendo | 5.57 | 3.28 | 5.65 | 0.82 | 15.32 |
| 27 | 28 | Brain Age 2: More Training in Minutes a Day | DS | 2005 | Puzzle | Nintendo | 3.44 | 5.36 | 5.32 | 1.18 | 15.30 |
| 30 | 31 | Pokémon Yellow: Special Pikachu Edition | GB | 1998 | Role-Playing | Nintendo | 5.89 | 5.04 | 3.12 | 0.59 | 14.64 |
| 32 | 33 | Pokemon X/Pokemon Y | 3DS | 2013 | Role-Playing | Nintendo | 5.17 | 4.05 | 4.34 | 0.79 | 14.35 |
| 39 | 40 | Super Smash Bros. Brawl | Wii | 2008 | Fighting | Nintendo | 6.75 | 2.61 | 2.66 | 1.02 | 13.04 |
| 41 | 42 | Animal Crossing: Wild World | DS | 2005 | Simulation | Nintendo | 2.55 | 3.52 | 5.33 | 0.88 | 12.27 |
| 42 | 43 | Mario Kart 7 | 3DS | 2011 | Racing | Nintendo | 4.74 | 3.91 | 2.67 | 0.89 | 12.21 |
| 45 | 46 | Pokemon HeartGold/Pokemon SoulSilver | DS | 2009 | Action | Nintendo | 4.40 | 2.77 | 3.96 | 0.77 | 11.90 |
| 49 | 50 | Pokemon Omega Ruby/Pokemon Alpha Sapphire | 3DS | 2014 | Role-Playing | Nintendo | 4.23 | 3.37 | 3.08 | 0.65 | 11.33 |
| 50 | 51 | Super Mario Land 2: 6 Golden Coins | GB | 1992 | Adventure | Nintendo | 6.16 | 2.04 | 2.69 | 0.29 | 11.18 |
| 52 | 53 | Gran Turismo | PS | 1997 | Racing | Sony Computer Entertainment | 4.02 | 3.87 | 2.54 | 0.52 | 10.95 |
| 53 | 54 | Super Mario 3D Land | 3DS | 2011 | Platform | Nintendo | 4.89 | 2.99 | 2.13 | 0.78 | 10.79 |
| 57 | 58 | Super Mario All-Stars | SNES | 1993 | Platform | Nintendo | 5.99 | 2.15 | 2.12 | 0.29 | 10.55 |
| 58 | 59 | Pokemon FireRed/Pokemon LeafGreen | GBA | 2004 | Role-Playing | Nintendo | 4.34 | 2.65 | 3.15 | 0.35 | 10.49 |
| 63 | 64 | Mario Kart 64 | N64 | 1996 | Racing | Nintendo | 5.55 | 1.94 | 2.23 | 0.15 | 9.87 |
| 64 | 65 | New Super Mario Bros. 2 | 3DS | 2012 | Platform | Nintendo | 3.66 | 3.07 | 2.47 | 0.63 | 9.82 |
| 66 | 67 | Final Fantasy VII | PS | 1997 | Role-Playing | Sony Computer Entertainment | 3.01 | 2.47 | 3.28 | 0.96 | 9.72 |
| 71 | 72 | Donkey Kong Country | SNES | 1994 | Platform | Nintendo | 4.36 | 1.71 | 3.00 | 0.23 | 9.30 |
| 73 | 74 | Animal Crossing: New Leaf | 3DS | 2012 | Simulation | Nintendo | 2.01 | 2.32 | 4.36 | 0.41 | 9.09 |
| 76 | 77 | Super Mario Kart | SNES | 1992 | Racing | Nintendo | 3.54 | 1.24 | 3.81 | 0.18 | 8.76 |
| 78 | 79 | Wii Party | Wii | 2010 | Misc | Nintendo | 1.79 | 3.53 | 2.49 | 0.68 | 8.49 |
| 81 | 82 | Pokemon Black 2/Pokemon White 2 | DS | 2012 | Role-Playing | Nintendo | 2.91 | 1.86 | 3.14 | 0.43 | 8.33 |
| 86 | 87 | Final Fantasy X | PS2 | 2001 | Role-Playing | Sony Computer Entertainment | 2.91 | 2.07 | 2.73 | 0.33 | 8.05 |
| 87 | 88 | Final Fantasy VIII | PS | 1999 | Role-Playing | SquareSoft | 2.28 | 1.72 | 3.63 | 0.23 | 7.86 |
| 88 | 89 | Pokémon Platinum Version | DS | 2008 | Role-Playing | Nintendo | 2.82 | 1.78 | 2.69 | 0.55 | 7.84 |
plt.figure(figsize=(15,3))
plt.bar(greater_JP['Name'],greater_JP['JP_Sales'],color='Magenta')
plt.xlabel('Name')
plt.ylabel('JP_Sales')
plt.title('Games Above Average of Global Sales in Japan')
plt.xticks(rotation=90)
plt.show()
greater_JP['Genre'].value_counts()
Role-Playing 14 Platform 10 Racing 6 Sports 4 Misc 3 Puzzle 2 Simulation 2 Action 1 Fighting 1 Adventure 1 Name: Genre, dtype: int64
less_JP=data[data['JP_Sales']<data['JP_Sales'].mean()]
less_JP
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 9 | 10 | Duck Hunt | NES | 1984 | Shooter | Nintendo | 26.93 | 0.63 | 0.28 | 0.47 | 28.31 |
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 15 | 16 | Kinect Adventures! | X360 | 2010 | Misc | Microsoft Game Studios | 14.97 | 4.94 | 0.24 | 1.67 | 21.82 |
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 17 | 18 | Grand Theft Auto: San Andreas | PS2 | 2004 | Action | Take-Two Interactive | 9.43 | 0.40 | 0.41 | 10.57 | 20.81 |
| 23 | 24 | Grand Theft Auto V | X360 | 2013 | Action | Take-Two Interactive | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 |
| 24 | 25 | Grand Theft Auto: Vice City | PS2 | 2002 | Action | Take-Two Interactive | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 |
| 28 | 29 | Gran Turismo 3: A-Spec | PS2 | 2001 | Racing | Sony Computer Entertainment | 6.85 | 5.09 | 1.87 | 1.16 | 14.98 |
| 29 | 30 | Call of Duty: Modern Warfare 3 | X360 | 2011 | Shooter | Activision | 9.03 | 4.28 | 0.13 | 1.32 | 14.76 |
| 31 | 32 | Call of Duty: Black Ops | X360 | 2010 | Shooter | Activision | 9.67 | 3.73 | 0.11 | 1.13 | 14.64 |
| 33 | 34 | Call of Duty: Black Ops 3 | PS4 | 2015 | Shooter | Activision | 5.77 | 5.81 | 0.35 | 2.31 | 14.24 |
| 34 | 35 | Call of Duty: Black Ops II | PS3 | 2012 | Shooter | Activision | 4.99 | 5.88 | 0.65 | 2.52 | 14.03 |
| 35 | 36 | Call of Duty: Black Ops II | X360 | 2012 | Shooter | Activision | 8.25 | 4.30 | 0.07 | 1.12 | 13.73 |
| 36 | 37 | Call of Duty: Modern Warfare 2 | X360 | 2009 | Shooter | Activision | 8.52 | 3.63 | 0.08 | 1.29 | 13.51 |
| 37 | 38 | Call of Duty: Modern Warfare 3 | PS3 | 2011 | Shooter | Activision | 5.54 | 5.82 | 0.49 | 1.62 | 13.46 |
| 38 | 39 | Grand Theft Auto III | PS2 | 2001 | Action | Take-Two Interactive | 6.99 | 4.51 | 0.30 | 1.30 | 13.10 |
| 40 | 41 | Call of Duty: Black Ops | PS3 | 2010 | Shooter | Activision | 5.98 | 4.44 | 0.48 | 1.83 | 12.73 |
| 43 | 44 | Halo 3 | X360 | 2007 | Shooter | Microsoft Game Studios | 7.97 | 2.83 | 0.13 | 1.21 | 12.14 |
| 44 | 45 | Grand Theft Auto V | PS4 | 2014 | Action | Take-Two Interactive | 3.80 | 5.81 | 0.36 | 2.02 | 11.98 |
| 46 | 47 | Super Mario 64 | N64 | 1996 | Platform | Nintendo | 6.91 | 2.85 | 1.91 | 0.23 | 11.89 |
| 47 | 48 | Gran Turismo 4 | PS2 | 2004 | Racing | Sony Computer Entertainment | 3.01 | 0.01 | 1.10 | 7.53 | 11.66 |
| 48 | 49 | Super Mario Galaxy | Wii | 2007 | Platform | Nintendo | 6.16 | 3.40 | 1.20 | 0.76 | 11.52 |
| 51 | 52 | Grand Theft Auto IV | X360 | 2008 | Action | Take-Two Interactive | 6.76 | 3.10 | 0.14 | 1.03 | 11.02 |
| 54 | 55 | Gran Turismo 5 | PS3 | 2010 | Racing | Sony Computer Entertainment | 2.96 | 4.88 | 0.81 | 2.12 | 10.77 |
| 55 | 56 | Call of Duty: Modern Warfare 2 | PS3 | 2009 | Shooter | Activision | 4.99 | 3.69 | 0.38 | 1.63 | 10.69 |
| 56 | 57 | Grand Theft Auto IV | PS3 | 2008 | Action | Take-Two Interactive | 4.76 | 3.76 | 0.44 | 1.62 | 10.57 |
| 59 | 60 | Super Mario 64 | DS | 2004 | Platform | Nintendo | 5.08 | 3.11 | 1.25 | 0.98 | 10.42 |
| 60 | 61 | Just Dance 3 | Wii | 2011 | Misc | Ubisoft | 6.05 | 3.15 | 0.00 | 1.07 | 10.26 |
| 61 | 62 | Call of Duty: Ghosts | X360 | 2013 | Shooter | Activision | 6.72 | 2.63 | 0.04 | 0.82 | 10.21 |
| 62 | 63 | Halo: Reach | X360 | 2010 | Shooter | Microsoft Game Studios | 7.03 | 1.98 | 0.08 | 0.78 | 9.88 |
| 65 | 66 | Halo 4 | X360 | 2012 | Shooter | Microsoft Game Studios | 6.63 | 2.36 | 0.04 | 0.73 | 9.76 |
| 67 | 68 | Call of Duty: Ghosts | PS3 | 2013 | Shooter | Activision | 4.09 | 3.73 | 0.38 | 1.38 | 9.59 |
| 68 | 69 | Just Dance 2 | Wii | 2010 | Misc | Ubisoft | 5.84 | 2.89 | 0.01 | 0.78 | 9.52 |
| 69 | 70 | Gran Turismo 2 | PS | 1999 | Racing | Sony Computer Entertainment | 3.88 | 3.42 | 1.69 | 0.50 | 9.49 |
| 70 | 71 | Call of Duty 4: Modern Warfare | X360 | 2007 | Shooter | Activision | 5.91 | 2.38 | 0.13 | 0.90 | 9.32 |
| 72 | 73 | Minecraft | X360 | 2013 | Misc | Microsoft Game Studios | 5.58 | 2.83 | 0.02 | 0.77 | 9.20 |
| 74 | 75 | Mario Party DS | DS | 2007 | Misc | Nintendo | 4.46 | 1.88 | 1.98 | 0.70 | 9.02 |
| 75 | 76 | The Elder Scrolls V: Skyrim | X360 | 2011 | Role-Playing | Bethesda Softworks | 5.03 | 2.86 | 0.10 | 0.85 | 8.84 |
| 77 | 78 | FIFA 16 | PS4 | 2015 | Sports | Electronic Arts | 1.11 | 6.06 | 0.06 | 1.26 | 8.49 |
| 79 | 80 | Halo 2 | XB | 2004 | Shooter | Microsoft Game Studios | 6.82 | 1.53 | 0.05 | 0.08 | 8.49 |
| 80 | 81 | Mario Party 8 | Wii | 2007 | Misc | Nintendo | 3.81 | 2.30 | 1.58 | 0.73 | 8.42 |
| 82 | 83 | FIFA Soccer 13 | PS3 | 2012 | Action | Electronic Arts | 1.06 | 5.05 | 0.13 | 2.01 | 8.24 |
| 83 | 84 | The Sims 3 | PC | 2009 | Simulation | Electronic Arts | 0.98 | 6.42 | 0.00 | 0.71 | 8.11 |
| 84 | 85 | GoldenEye 007 | N64 | 1997 | Shooter | Nintendo | 5.80 | 2.01 | 0.13 | 0.15 | 8.09 |
| 85 | 86 | Mario & Sonic at the Olympic Games | Wii | 2007 | Sports | Sega | 2.58 | 3.90 | 0.66 | 0.91 | 8.06 |
| 89 | 90 | Pac-Man | 2600 | 1982 | Puzzle | Atari | 7.28 | 0.45 | 0.00 | 0.08 | 7.81 |
| 90 | 91 | Grand Theft Auto: Liberty City Stories | PSP | 2005 | Action | Take-Two Interactive | 2.90 | 2.83 | 0.24 | 1.75 | 7.72 |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 92 | 93 | Star Wars Battlefront (2015) | PS4 | 2015 | Shooter | Electronic Arts | 2.93 | 3.29 | 0.22 | 1.23 | 7.67 |
| 93 | 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
| 95 | 96 | Crash Bandicoot 2: Cortex Strikes Back | PS | 1997 | Platform | Sony Computer Entertainment | 3.78 | 2.17 | 1.31 | 0.31 | 7.58 |
plt.figure(figsize=(15,3))
plt.bar(less_JP['Name'],less_JP['JP_Sales'],color='Orange')
plt.xlabel('Name')
plt.ylabel('JP_Sales')
plt.title('Games Below Average of Japan Sales')
plt.xticks(rotation=90)
plt.show()
less_JP['Genre'].value_counts()
Shooter 20 Action 11 Misc 6 Platform 5 Racing 4 Sports 2 Simulation 2 Puzzle 1 Role-Playing 1 Name: Genre, dtype: int64
data['Publisher'].value_counts()
Nintendo 50 Activision 13 Take-Two Interactive 9 Sony Computer Entertainment 8 Microsoft Game Studios 6 Electronic Arts 4 Ubisoft 2 SquareSoft 1 Bethesda Softworks 1 Atari 1 Sega 1 Name: Publisher, dtype: int64
plt.figure(figsize=(15,3))
sns.countplot(data["Publisher"])
plt.xticks(rotation=90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [Text(0, 0, 'Nintendo'), Text(1, 0, 'Microsoft Game Studios'), Text(2, 0, 'Take-Two Interactive'), Text(3, 0, 'Sony Computer Entertainment'), Text(4, 0, 'Activision'), Text(5, 0, 'Ubisoft'), Text(6, 0, 'Bethesda Softworks'), Text(7, 0, 'Electronic Arts'), Text(8, 0, 'Sega'), Text(9, 0, 'SquareSoft'), Text(10, 0, 'Atari')])
data_nintendo=data[data['Publisher']=='Nintendo']
data_nintendo
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 5 | 6 | Tetris | GB | 1989 | Puzzle | Nintendo | 23.20 | 2.26 | 4.22 | 0.58 | 30.26 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 9 | 10 | Duck Hunt | NES | 1984 | Shooter | Nintendo | 26.93 | 0.63 | 0.28 | 0.47 | 28.31 |
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 11 | 12 | Mario Kart DS | DS | 2005 | Racing | Nintendo | 9.81 | 7.57 | 4.13 | 1.92 | 23.42 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 18 | 19 | Super Mario World | SNES | 1990 | Platform | Nintendo | 12.78 | 3.75 | 3.54 | 0.55 | 20.61 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
| 21 | 22 | Super Mario Land | GB | 1989 | Platform | Nintendo | 10.83 | 2.71 | 4.18 | 0.42 | 18.14 |
| 22 | 23 | Super Mario Bros. 3 | NES | 1988 | Platform | Nintendo | 9.54 | 3.44 | 3.84 | 0.46 | 17.28 |
| 25 | 26 | Pokemon Ruby/Pokemon Sapphire | GBA | 2002 | Role-Playing | Nintendo | 6.06 | 3.90 | 5.38 | 0.50 | 15.85 |
| 26 | 27 | Pokemon Black/Pokemon White | DS | 2010 | Role-Playing | Nintendo | 5.57 | 3.28 | 5.65 | 0.82 | 15.32 |
| 27 | 28 | Brain Age 2: More Training in Minutes a Day | DS | 2005 | Puzzle | Nintendo | 3.44 | 5.36 | 5.32 | 1.18 | 15.30 |
| 30 | 31 | Pokémon Yellow: Special Pikachu Edition | GB | 1998 | Role-Playing | Nintendo | 5.89 | 5.04 | 3.12 | 0.59 | 14.64 |
| 32 | 33 | Pokemon X/Pokemon Y | 3DS | 2013 | Role-Playing | Nintendo | 5.17 | 4.05 | 4.34 | 0.79 | 14.35 |
| 39 | 40 | Super Smash Bros. Brawl | Wii | 2008 | Fighting | Nintendo | 6.75 | 2.61 | 2.66 | 1.02 | 13.04 |
| 41 | 42 | Animal Crossing: Wild World | DS | 2005 | Simulation | Nintendo | 2.55 | 3.52 | 5.33 | 0.88 | 12.27 |
| 42 | 43 | Mario Kart 7 | 3DS | 2011 | Racing | Nintendo | 4.74 | 3.91 | 2.67 | 0.89 | 12.21 |
| 45 | 46 | Pokemon HeartGold/Pokemon SoulSilver | DS | 2009 | Action | Nintendo | 4.40 | 2.77 | 3.96 | 0.77 | 11.90 |
| 46 | 47 | Super Mario 64 | N64 | 1996 | Platform | Nintendo | 6.91 | 2.85 | 1.91 | 0.23 | 11.89 |
| 48 | 49 | Super Mario Galaxy | Wii | 2007 | Platform | Nintendo | 6.16 | 3.40 | 1.20 | 0.76 | 11.52 |
| 49 | 50 | Pokemon Omega Ruby/Pokemon Alpha Sapphire | 3DS | 2014 | Role-Playing | Nintendo | 4.23 | 3.37 | 3.08 | 0.65 | 11.33 |
| 50 | 51 | Super Mario Land 2: 6 Golden Coins | GB | 1992 | Adventure | Nintendo | 6.16 | 2.04 | 2.69 | 0.29 | 11.18 |
| 53 | 54 | Super Mario 3D Land | 3DS | 2011 | Platform | Nintendo | 4.89 | 2.99 | 2.13 | 0.78 | 10.79 |
| 57 | 58 | Super Mario All-Stars | SNES | 1993 | Platform | Nintendo | 5.99 | 2.15 | 2.12 | 0.29 | 10.55 |
| 58 | 59 | Pokemon FireRed/Pokemon LeafGreen | GBA | 2004 | Role-Playing | Nintendo | 4.34 | 2.65 | 3.15 | 0.35 | 10.49 |
| 59 | 60 | Super Mario 64 | DS | 2004 | Platform | Nintendo | 5.08 | 3.11 | 1.25 | 0.98 | 10.42 |
| 63 | 64 | Mario Kart 64 | N64 | 1996 | Racing | Nintendo | 5.55 | 1.94 | 2.23 | 0.15 | 9.87 |
| 64 | 65 | New Super Mario Bros. 2 | 3DS | 2012 | Platform | Nintendo | 3.66 | 3.07 | 2.47 | 0.63 | 9.82 |
| 71 | 72 | Donkey Kong Country | SNES | 1994 | Platform | Nintendo | 4.36 | 1.71 | 3.00 | 0.23 | 9.30 |
| 73 | 74 | Animal Crossing: New Leaf | 3DS | 2012 | Simulation | Nintendo | 2.01 | 2.32 | 4.36 | 0.41 | 9.09 |
| 74 | 75 | Mario Party DS | DS | 2007 | Misc | Nintendo | 4.46 | 1.88 | 1.98 | 0.70 | 9.02 |
| 76 | 77 | Super Mario Kart | SNES | 1992 | Racing | Nintendo | 3.54 | 1.24 | 3.81 | 0.18 | 8.76 |
| 78 | 79 | Wii Party | Wii | 2010 | Misc | Nintendo | 1.79 | 3.53 | 2.49 | 0.68 | 8.49 |
| 80 | 81 | Mario Party 8 | Wii | 2007 | Misc | Nintendo | 3.81 | 2.30 | 1.58 | 0.73 | 8.42 |
| 81 | 82 | Pokemon Black 2/Pokemon White 2 | DS | 2012 | Role-Playing | Nintendo | 2.91 | 1.86 | 3.14 | 0.43 | 8.33 |
| 84 | 85 | GoldenEye 007 | N64 | 1997 | Shooter | Nintendo | 5.80 | 2.01 | 0.13 | 0.15 | 8.09 |
| 88 | 89 | Pokémon Platinum Version | DS | 2008 | Role-Playing | Nintendo | 2.82 | 1.78 | 2.69 | 0.55 | 7.84 |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
plt.figure(figsize=(15,5))
sns.lineplot(x='Name',y='Global_Sales',hue='Platform',data=data_nintendo)
plt.xticks(rotation=90)
plt.show()
plt.figure(figsize=(15,5))
sns.lineplot(x='Year',y='Global_Sales',data=data_nintendo)
plt.xticks(rotation=90)
plt.title("Yearwise Global Sales of Nintendo")
plt.show()
data[data['Publisher']=='Nintendo']["Platform"].value_counts()
DS 13 Wii 12 GB 6 3DS 6 N64 4 SNES 4 NES 3 GBA 2 Name: Platform, dtype: int64
plt.figure(figsize=(15,3))
sns.countplot(data_nintendo["Platform"])
plt.xticks(rotation=90)
(array([0, 1, 2, 3, 4, 5, 6, 7]), [Text(0, 0, 'Wii'), Text(1, 0, 'NES'), Text(2, 0, 'GB'), Text(3, 0, 'DS'), Text(4, 0, 'SNES'), Text(5, 0, 'GBA'), Text(6, 0, '3DS'), Text(7, 0, 'N64')])
data[data['Publisher']=='Nintendo']['Global_Sales'].sum()
905.3700000000001
d_nintendo=data[data['Publisher']=='Nintendo']
d_nintendo
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 5 | 6 | Tetris | GB | 1989 | Puzzle | Nintendo | 23.20 | 2.26 | 4.22 | 0.58 | 30.26 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 9 | 10 | Duck Hunt | NES | 1984 | Shooter | Nintendo | 26.93 | 0.63 | 0.28 | 0.47 | 28.31 |
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 11 | 12 | Mario Kart DS | DS | 2005 | Racing | Nintendo | 9.81 | 7.57 | 4.13 | 1.92 | 23.42 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 18 | 19 | Super Mario World | SNES | 1990 | Platform | Nintendo | 12.78 | 3.75 | 3.54 | 0.55 | 20.61 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
| 21 | 22 | Super Mario Land | GB | 1989 | Platform | Nintendo | 10.83 | 2.71 | 4.18 | 0.42 | 18.14 |
| 22 | 23 | Super Mario Bros. 3 | NES | 1988 | Platform | Nintendo | 9.54 | 3.44 | 3.84 | 0.46 | 17.28 |
| 25 | 26 | Pokemon Ruby/Pokemon Sapphire | GBA | 2002 | Role-Playing | Nintendo | 6.06 | 3.90 | 5.38 | 0.50 | 15.85 |
| 26 | 27 | Pokemon Black/Pokemon White | DS | 2010 | Role-Playing | Nintendo | 5.57 | 3.28 | 5.65 | 0.82 | 15.32 |
| 27 | 28 | Brain Age 2: More Training in Minutes a Day | DS | 2005 | Puzzle | Nintendo | 3.44 | 5.36 | 5.32 | 1.18 | 15.30 |
| 30 | 31 | Pokémon Yellow: Special Pikachu Edition | GB | 1998 | Role-Playing | Nintendo | 5.89 | 5.04 | 3.12 | 0.59 | 14.64 |
| 32 | 33 | Pokemon X/Pokemon Y | 3DS | 2013 | Role-Playing | Nintendo | 5.17 | 4.05 | 4.34 | 0.79 | 14.35 |
| 39 | 40 | Super Smash Bros. Brawl | Wii | 2008 | Fighting | Nintendo | 6.75 | 2.61 | 2.66 | 1.02 | 13.04 |
| 41 | 42 | Animal Crossing: Wild World | DS | 2005 | Simulation | Nintendo | 2.55 | 3.52 | 5.33 | 0.88 | 12.27 |
| 42 | 43 | Mario Kart 7 | 3DS | 2011 | Racing | Nintendo | 4.74 | 3.91 | 2.67 | 0.89 | 12.21 |
| 45 | 46 | Pokemon HeartGold/Pokemon SoulSilver | DS | 2009 | Action | Nintendo | 4.40 | 2.77 | 3.96 | 0.77 | 11.90 |
| 46 | 47 | Super Mario 64 | N64 | 1996 | Platform | Nintendo | 6.91 | 2.85 | 1.91 | 0.23 | 11.89 |
| 48 | 49 | Super Mario Galaxy | Wii | 2007 | Platform | Nintendo | 6.16 | 3.40 | 1.20 | 0.76 | 11.52 |
| 49 | 50 | Pokemon Omega Ruby/Pokemon Alpha Sapphire | 3DS | 2014 | Role-Playing | Nintendo | 4.23 | 3.37 | 3.08 | 0.65 | 11.33 |
| 50 | 51 | Super Mario Land 2: 6 Golden Coins | GB | 1992 | Adventure | Nintendo | 6.16 | 2.04 | 2.69 | 0.29 | 11.18 |
| 53 | 54 | Super Mario 3D Land | 3DS | 2011 | Platform | Nintendo | 4.89 | 2.99 | 2.13 | 0.78 | 10.79 |
| 57 | 58 | Super Mario All-Stars | SNES | 1993 | Platform | Nintendo | 5.99 | 2.15 | 2.12 | 0.29 | 10.55 |
| 58 | 59 | Pokemon FireRed/Pokemon LeafGreen | GBA | 2004 | Role-Playing | Nintendo | 4.34 | 2.65 | 3.15 | 0.35 | 10.49 |
| 59 | 60 | Super Mario 64 | DS | 2004 | Platform | Nintendo | 5.08 | 3.11 | 1.25 | 0.98 | 10.42 |
| 63 | 64 | Mario Kart 64 | N64 | 1996 | Racing | Nintendo | 5.55 | 1.94 | 2.23 | 0.15 | 9.87 |
| 64 | 65 | New Super Mario Bros. 2 | 3DS | 2012 | Platform | Nintendo | 3.66 | 3.07 | 2.47 | 0.63 | 9.82 |
| 71 | 72 | Donkey Kong Country | SNES | 1994 | Platform | Nintendo | 4.36 | 1.71 | 3.00 | 0.23 | 9.30 |
| 73 | 74 | Animal Crossing: New Leaf | 3DS | 2012 | Simulation | Nintendo | 2.01 | 2.32 | 4.36 | 0.41 | 9.09 |
| 74 | 75 | Mario Party DS | DS | 2007 | Misc | Nintendo | 4.46 | 1.88 | 1.98 | 0.70 | 9.02 |
| 76 | 77 | Super Mario Kart | SNES | 1992 | Racing | Nintendo | 3.54 | 1.24 | 3.81 | 0.18 | 8.76 |
| 78 | 79 | Wii Party | Wii | 2010 | Misc | Nintendo | 1.79 | 3.53 | 2.49 | 0.68 | 8.49 |
| 80 | 81 | Mario Party 8 | Wii | 2007 | Misc | Nintendo | 3.81 | 2.30 | 1.58 | 0.73 | 8.42 |
| 81 | 82 | Pokemon Black 2/Pokemon White 2 | DS | 2012 | Role-Playing | Nintendo | 2.91 | 1.86 | 3.14 | 0.43 | 8.33 |
| 84 | 85 | GoldenEye 007 | N64 | 1997 | Shooter | Nintendo | 5.80 | 2.01 | 0.13 | 0.15 | 8.09 |
| 88 | 89 | Pokémon Platinum Version | DS | 2008 | Role-Playing | Nintendo | 2.82 | 1.78 | 2.69 | 0.55 | 7.84 |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
data[data['Publisher']=='Nintendo']['Global_Sales'].mean()
18.1074
data['Platform'].unique()
array(['Wii', 'NES', 'GB', 'DS', 'X360', 'PS3', 'PS2', 'SNES', 'GBA',
'3DS', 'PS4', 'N64', 'PS', 'XB', 'PC', 2600, 'PSP'], dtype=object)
data['Platform'].value_counts()
Wii 15 X360 14 DS 13 PS3 9 GB 6 PS2 6 3DS 6 PS 5 PS4 5 SNES 4 N64 4 NES 3 GBA 2 PC 1 XB 1 2600 1 PSP 1 Name: Platform, dtype: int64
plt.figure(figsize=(15,3))
sns.countplot(data["Platform"])
plt.xticks(rotation=90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]), [Text(0, 0, 'Wii'), Text(1, 0, 'NES'), Text(2, 0, 'GB'), Text(3, 0, 'DS'), Text(4, 0, 'X360'), Text(5, 0, 'PS3'), Text(6, 0, 'PS2'), Text(7, 0, 'SNES'), Text(8, 0, 'GBA'), Text(9, 0, '3DS'), Text(10, 0, 'PS4'), Text(11, 0, 'N64'), Text(12, 0, 'PS'), Text(13, 0, 'XB'), Text(14, 0, 'PC'), Text(15, 0, '2600'), Text(16, 0, 'PSP')])
wii_data=data[data['Platform']=='Wii']
wii_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 39 | 40 | Super Smash Bros. Brawl | Wii | 2008 | Fighting | Nintendo | 6.75 | 2.61 | 2.66 | 1.02 | 13.04 |
| 48 | 49 | Super Mario Galaxy | Wii | 2007 | Platform | Nintendo | 6.16 | 3.40 | 1.20 | 0.76 | 11.52 |
| 60 | 61 | Just Dance 3 | Wii | 2011 | Misc | Ubisoft | 6.05 | 3.15 | 0.00 | 1.07 | 10.26 |
| 68 | 69 | Just Dance 2 | Wii | 2010 | Misc | Ubisoft | 5.84 | 2.89 | 0.01 | 0.78 | 9.52 |
| 78 | 79 | Wii Party | Wii | 2010 | Misc | Nintendo | 1.79 | 3.53 | 2.49 | 0.68 | 8.49 |
| 80 | 81 | Mario Party 8 | Wii | 2007 | Misc | Nintendo | 3.81 | 2.30 | 1.58 | 0.73 | 8.42 |
| 85 | 86 | Mario & Sonic at the Olympic Games | Wii | 2007 | Sports | Sega | 2.58 | 3.90 | 0.66 | 0.91 | 8.06 |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
wii_data['Name'].unique()
array(['Wii Sports', 'Mario Kart Wii', 'Wii Sports Resort', 'Wii Play',
'New Super Mario Bros. Wii', 'Wii Fit', 'Wii Fit Plus',
'Super Smash Bros. Brawl', 'Super Mario Galaxy', 'Just Dance 3',
'Just Dance 2', 'Wii Party', 'Mario Party 8',
'Mario & Sonic at the Olympic Games', 'Super Mario Galaxy 2'],
dtype=object)
wii_data['Genre'].unique()
array(['Sports', 'Racing', 'Misc', 'Platform', 'Fighting'], dtype=object)
wii_data['Genre'].value_counts()
Misc 5 Sports 5 Platform 3 Fighting 1 Racing 1 Name: Genre, dtype: int64
data['Year'].value_counts()
2010 9 2012 7 2009 7 2007 7 2013 6 2011 6 2005 6 2008 5 2004 5 2006 4 1997 4 2015 3 1999 3 1996 3 2001 3 2014 3 1998 2 2002 2 1992 2 1989 2 1994 1 1993 1 1990 1 1988 1 1985 1 1984 1 1982 1 Name: Year, dtype: int64
data[data['Year']==2010]
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 15 | 16 | Kinect Adventures! | X360 | 2010 | Misc | Microsoft Game Studios | 14.97 | 4.94 | 0.24 | 1.67 | 21.82 |
| 26 | 27 | Pokemon Black/Pokemon White | DS | 2010 | Role-Playing | Nintendo | 5.57 | 3.28 | 5.65 | 0.82 | 15.32 |
| 31 | 32 | Call of Duty: Black Ops | X360 | 2010 | Shooter | Activision | 9.67 | 3.73 | 0.11 | 1.13 | 14.64 |
| 40 | 41 | Call of Duty: Black Ops | PS3 | 2010 | Shooter | Activision | 5.98 | 4.44 | 0.48 | 1.83 | 12.73 |
| 54 | 55 | Gran Turismo 5 | PS3 | 2010 | Racing | Sony Computer Entertainment | 2.96 | 4.88 | 0.81 | 2.12 | 10.77 |
| 62 | 63 | Halo: Reach | X360 | 2010 | Shooter | Microsoft Game Studios | 7.03 | 1.98 | 0.08 | 0.78 | 9.88 |
| 68 | 69 | Just Dance 2 | Wii | 2010 | Misc | Ubisoft | 5.84 | 2.89 | 0.01 | 0.78 | 9.52 |
| 78 | 79 | Wii Party | Wii | 2010 | Misc | Nintendo | 1.79 | 3.53 | 2.49 | 0.68 | 8.49 |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
data['Genre'].unique()
array(['Sports', 'Platform', 'Racing', 'Role-Playing', 'Puzzle', 'Misc',
'Shooter', 'Simulation', 'Action', 'Fighting', 'Adventure'],
dtype=object)
data_sorted=data.sort_values(['Genre','Rank'])
data_sorted
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 17 | 18 | Grand Theft Auto: San Andreas | PS2 | 2004 | Action | Take-Two Interactive | 9.43 | 0.40 | 0.41 | 10.57 | 20.81 |
| 23 | 24 | Grand Theft Auto V | X360 | 2013 | Action | Take-Two Interactive | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 |
| 24 | 25 | Grand Theft Auto: Vice City | PS2 | 2002 | Action | Take-Two Interactive | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 |
| 38 | 39 | Grand Theft Auto III | PS2 | 2001 | Action | Take-Two Interactive | 6.99 | 4.51 | 0.30 | 1.30 | 13.10 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 77 | 78 | FIFA 16 | PS4 | 2015 | Sports | Electronic Arts | 1.11 | 6.06 | 0.06 | 1.26 | 8.49 |
| 85 | 86 | Mario & Sonic at the Olympic Games | Wii | 2007 | Sports | Sega | 2.58 | 3.90 | 0.66 | 0.91 | 8.06 |
96 rows × 11 columns
genre_data=data.groupby(['Genre','Rank']).sum()
genre_data
| Year | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | ||
|---|---|---|---|---|---|---|---|
| Genre | Rank | ||||||
| Action | 17 | 2013 | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 18 | 2004 | 9.43 | 0.40 | 0.41 | 10.57 | 20.81 | |
| 24 | 2013 | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 | |
| 25 | 2002 | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 | |
| 39 | 2001 | 6.99 | 4.51 | 0.30 | 1.30 | 13.10 | |
| ... | ... | ... | ... | ... | ... | ... | ... |
| Sports | 4 | 2009 | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 14 | 2007 | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 | |
| 15 | 2009 | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 | |
| 78 | 2015 | 1.11 | 6.06 | 0.06 | 1.26 | 8.49 | |
| 86 | 2007 | 2.58 | 3.90 | 0.66 | 0.91 | 8.06 |
96 rows × 6 columns
actiondata=data[data['Genre']=='Action']
actiondata
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | 17 | Grand Theft Auto V | PS3 | 2013 | Action | Take-Two Interactive | 7.01 | 9.27 | 0.97 | 4.14 | 21.40 |
| 17 | 18 | Grand Theft Auto: San Andreas | PS2 | 2004 | Action | Take-Two Interactive | 9.43 | 0.40 | 0.41 | 10.57 | 20.81 |
| 23 | 24 | Grand Theft Auto V | X360 | 2013 | Action | Take-Two Interactive | 9.63 | 5.31 | 0.06 | 1.38 | 16.38 |
| 24 | 25 | Grand Theft Auto: Vice City | PS2 | 2002 | Action | Take-Two Interactive | 8.41 | 5.49 | 0.47 | 1.78 | 16.15 |
| 38 | 39 | Grand Theft Auto III | PS2 | 2001 | Action | Take-Two Interactive | 6.99 | 4.51 | 0.30 | 1.30 | 13.10 |
| 44 | 45 | Grand Theft Auto V | PS4 | 2014 | Action | Take-Two Interactive | 3.80 | 5.81 | 0.36 | 2.02 | 11.98 |
| 45 | 46 | Pokemon HeartGold/Pokemon SoulSilver | DS | 2009 | Action | Nintendo | 4.40 | 2.77 | 3.96 | 0.77 | 11.90 |
| 51 | 52 | Grand Theft Auto IV | X360 | 2008 | Action | Take-Two Interactive | 6.76 | 3.10 | 0.14 | 1.03 | 11.02 |
| 56 | 57 | Grand Theft Auto IV | PS3 | 2008 | Action | Take-Two Interactive | 4.76 | 3.76 | 0.44 | 1.62 | 10.57 |
| 82 | 83 | FIFA Soccer 13 | PS3 | 2012 | Action | Electronic Arts | 1.06 | 5.05 | 0.13 | 2.01 | 8.24 |
| 90 | 91 | Grand Theft Auto: Liberty City Stories | PSP | 2005 | Action | Take-Two Interactive | 2.90 | 2.83 | 0.24 | 1.75 | 7.72 |
| 94 | 95 | The Legend of Zelda: Ocarina of Time | N64 | 1998 | Action | Nintendo | 4.10 | 1.89 | 1.45 | 0.16 | 7.60 |
sns.pairplot(actiondata,diag_kind='kde',hue='Platform')
plt.show()
actiondata['Publisher'].unique()
array(['Take-Two Interactive', 'Nintendo', 'Electronic Arts'],
dtype=object)
actiondata[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 16 | Grand Theft Auto V | PS3 |
| 17 | Grand Theft Auto: San Andreas | PS2 |
| 23 | Grand Theft Auto V | X360 |
| 24 | Grand Theft Auto: Vice City | PS2 |
| 38 | Grand Theft Auto III | PS2 |
| 44 | Grand Theft Auto V | PS4 |
| 45 | Pokemon HeartGold/Pokemon SoulSilver | DS |
| 51 | Grand Theft Auto IV | X360 |
| 56 | Grand Theft Auto IV | PS3 |
| 82 | FIFA Soccer 13 | PS3 |
| 90 | Grand Theft Auto: Liberty City Stories | PSP |
| 94 | The Legend of Zelda: Ocarina of Time | N64 |
actiondata['Platform'].unique()
array(['PS3', 'PS2', 'X360', 'PS4', 'DS', 'PSP', 'N64'], dtype=object)
sportsdata=data[data['Genre']=='Sports']
sportsdata
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Wii Sports | Wii | 2006 | Sports | Nintendo | 41.49 | 29.02 | 3.77 | 8.46 | 82.74 |
| 3 | 4 | Wii Sports Resort | Wii | 2009 | Sports | Nintendo | 15.75 | 11.01 | 3.28 | 2.96 | 33.00 |
| 13 | 14 | Wii Fit | Wii | 2007 | Sports | Nintendo | 8.94 | 8.03 | 3.60 | 2.15 | 22.72 |
| 14 | 15 | Wii Fit Plus | Wii | 2009 | Sports | Nintendo | 9.09 | 8.59 | 2.53 | 1.79 | 22.00 |
| 77 | 78 | FIFA 16 | PS4 | 2015 | Sports | Electronic Arts | 1.11 | 6.06 | 0.06 | 1.26 | 8.49 |
| 85 | 86 | Mario & Sonic at the Olympic Games | Wii | 2007 | Sports | Sega | 2.58 | 3.90 | 0.66 | 0.91 | 8.06 |
sns.pairplot(sportsdata,diag_kind='kde',hue='Platform')
plt.show()
sportsdata['Publisher'].unique()
array(['Nintendo', 'Electronic Arts', 'Sega'], dtype=object)
sportsdata[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 0 | Wii Sports | Wii |
| 3 | Wii Sports Resort | Wii |
| 13 | Wii Fit | Wii |
| 14 | Wii Fit Plus | Wii |
| 77 | FIFA 16 | PS4 |
| 85 | Mario & Sonic at the Olympic Games | Wii |
racingdata=data[data['Genre']=='Racing']
racingdata
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 3 | Mario Kart Wii | Wii | 2008 | Racing | Nintendo | 15.85 | 12.88 | 3.79 | 3.31 | 35.82 |
| 11 | 12 | Mario Kart DS | DS | 2005 | Racing | Nintendo | 9.81 | 7.57 | 4.13 | 1.92 | 23.42 |
| 28 | 29 | Gran Turismo 3: A-Spec | PS2 | 2001 | Racing | Sony Computer Entertainment | 6.85 | 5.09 | 1.87 | 1.16 | 14.98 |
| 42 | 43 | Mario Kart 7 | 3DS | 2011 | Racing | Nintendo | 4.74 | 3.91 | 2.67 | 0.89 | 12.21 |
| 47 | 48 | Gran Turismo 4 | PS2 | 2004 | Racing | Sony Computer Entertainment | 3.01 | 0.01 | 1.10 | 7.53 | 11.66 |
| 52 | 53 | Gran Turismo | PS | 1997 | Racing | Sony Computer Entertainment | 4.02 | 3.87 | 2.54 | 0.52 | 10.95 |
| 54 | 55 | Gran Turismo 5 | PS3 | 2010 | Racing | Sony Computer Entertainment | 2.96 | 4.88 | 0.81 | 2.12 | 10.77 |
| 63 | 64 | Mario Kart 64 | N64 | 1996 | Racing | Nintendo | 5.55 | 1.94 | 2.23 | 0.15 | 9.87 |
| 69 | 70 | Gran Turismo 2 | PS | 1999 | Racing | Sony Computer Entertainment | 3.88 | 3.42 | 1.69 | 0.50 | 9.49 |
| 76 | 77 | Super Mario Kart | SNES | 1992 | Racing | Nintendo | 3.54 | 1.24 | 3.81 | 0.18 | 8.76 |
sns.pairplot(racingdata,diag_kind='kde',hue='Platform')
plt.show()
racingdata['Publisher'].unique()
array(['Nintendo', 'Sony Computer Entertainment'], dtype=object)
racingdata[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 2 | Mario Kart Wii | Wii |
| 11 | Mario Kart DS | DS |
| 28 | Gran Turismo 3: A-Spec | PS2 |
| 42 | Mario Kart 7 | 3DS |
| 47 | Gran Turismo 4 | PS2 |
| 52 | Gran Turismo | PS |
| 54 | Gran Turismo 5 | PS3 |
| 63 | Mario Kart 64 | N64 |
| 69 | Gran Turismo 2 | PS |
| 76 | Super Mario Kart | SNES |
platform_data=data[data['Genre']=='Platform']
platform_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | Super Mario Bros. | NES | 1985 | Platform | Nintendo | 29.08 | 3.58 | 6.81 | 0.77 | 40.24 |
| 6 | 7 | New Super Mario Bros. | DS | 2006 | Platform | Nintendo | 11.38 | 9.23 | 6.50 | 2.90 | 30.01 |
| 8 | 9 | New Super Mario Bros. Wii | Wii | 2009 | Platform | Nintendo | 14.59 | 7.06 | 4.70 | 2.26 | 28.62 |
| 18 | 19 | Super Mario World | SNES | 1990 | Platform | Nintendo | 12.78 | 3.75 | 3.54 | 0.55 | 20.61 |
| 21 | 22 | Super Mario Land | GB | 1989 | Platform | Nintendo | 10.83 | 2.71 | 4.18 | 0.42 | 18.14 |
| 22 | 23 | Super Mario Bros. 3 | NES | 1988 | Platform | Nintendo | 9.54 | 3.44 | 3.84 | 0.46 | 17.28 |
| 46 | 47 | Super Mario 64 | N64 | 1996 | Platform | Nintendo | 6.91 | 2.85 | 1.91 | 0.23 | 11.89 |
| 48 | 49 | Super Mario Galaxy | Wii | 2007 | Platform | Nintendo | 6.16 | 3.40 | 1.20 | 0.76 | 11.52 |
| 53 | 54 | Super Mario 3D Land | 3DS | 2011 | Platform | Nintendo | 4.89 | 2.99 | 2.13 | 0.78 | 10.79 |
| 57 | 58 | Super Mario All-Stars | SNES | 1993 | Platform | Nintendo | 5.99 | 2.15 | 2.12 | 0.29 | 10.55 |
| 59 | 60 | Super Mario 64 | DS | 2004 | Platform | Nintendo | 5.08 | 3.11 | 1.25 | 0.98 | 10.42 |
| 64 | 65 | New Super Mario Bros. 2 | 3DS | 2012 | Platform | Nintendo | 3.66 | 3.07 | 2.47 | 0.63 | 9.82 |
| 71 | 72 | Donkey Kong Country | SNES | 1994 | Platform | Nintendo | 4.36 | 1.71 | 3.00 | 0.23 | 9.30 |
| 91 | 92 | Super Mario Galaxy 2 | Wii | 2010 | Platform | Nintendo | 3.66 | 2.42 | 0.98 | 0.64 | 7.69 |
| 95 | 96 | Crash Bandicoot 2: Cortex Strikes Back | PS | 1997 | Platform | Sony Computer Entertainment | 3.78 | 2.17 | 1.31 | 0.31 | 7.58 |
sns.pairplot(platform_data,diag_kind='kde',hue='Platform')
plt.show()
platform_data['Publisher'].unique()
array(['Nintendo', 'Sony Computer Entertainment'], dtype=object)
platform_data[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 1 | Super Mario Bros. | NES |
| 6 | New Super Mario Bros. | DS |
| 8 | New Super Mario Bros. Wii | Wii |
| 18 | Super Mario World | SNES |
| 21 | Super Mario Land | GB |
| 22 | Super Mario Bros. 3 | NES |
| 46 | Super Mario 64 | N64 |
| 48 | Super Mario Galaxy | Wii |
| 53 | Super Mario 3D Land | 3DS |
| 57 | Super Mario All-Stars | SNES |
| 59 | Super Mario 64 | DS |
| 64 | New Super Mario Bros. 2 | 3DS |
| 71 | Donkey Kong Country | SNES |
| 91 | Super Mario Galaxy 2 | Wii |
| 95 | Crash Bandicoot 2: Cortex Strikes Back | PS |
rollplay_data=data[data['Genre']=='Role-Playing']
rollplay_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 5 | Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing | Nintendo | 11.27 | 8.89 | 10.22 | 1.00 | 31.37 |
| 12 | 13 | Pokemon Gold/Pokemon Silver | GB | 1999 | Role-Playing | Nintendo | 9.00 | 6.18 | 7.20 | 0.71 | 23.10 |
| 20 | 21 | Pokemon Diamond/Pokemon Pearl | DS | 2006 | Role-Playing | Nintendo | 6.42 | 4.52 | 6.04 | 1.37 | 18.36 |
| 25 | 26 | Pokemon Ruby/Pokemon Sapphire | GBA | 2002 | Role-Playing | Nintendo | 6.06 | 3.90 | 5.38 | 0.50 | 15.85 |
| 26 | 27 | Pokemon Black/Pokemon White | DS | 2010 | Role-Playing | Nintendo | 5.57 | 3.28 | 5.65 | 0.82 | 15.32 |
| 30 | 31 | Pokémon Yellow: Special Pikachu Edition | GB | 1998 | Role-Playing | Nintendo | 5.89 | 5.04 | 3.12 | 0.59 | 14.64 |
| 32 | 33 | Pokemon X/Pokemon Y | 3DS | 2013 | Role-Playing | Nintendo | 5.17 | 4.05 | 4.34 | 0.79 | 14.35 |
| 49 | 50 | Pokemon Omega Ruby/Pokemon Alpha Sapphire | 3DS | 2014 | Role-Playing | Nintendo | 4.23 | 3.37 | 3.08 | 0.65 | 11.33 |
| 58 | 59 | Pokemon FireRed/Pokemon LeafGreen | GBA | 2004 | Role-Playing | Nintendo | 4.34 | 2.65 | 3.15 | 0.35 | 10.49 |
| 66 | 67 | Final Fantasy VII | PS | 1997 | Role-Playing | Sony Computer Entertainment | 3.01 | 2.47 | 3.28 | 0.96 | 9.72 |
| 75 | 76 | The Elder Scrolls V: Skyrim | X360 | 2011 | Role-Playing | Bethesda Softworks | 5.03 | 2.86 | 0.10 | 0.85 | 8.84 |
| 81 | 82 | Pokemon Black 2/Pokemon White 2 | DS | 2012 | Role-Playing | Nintendo | 2.91 | 1.86 | 3.14 | 0.43 | 8.33 |
| 86 | 87 | Final Fantasy X | PS2 | 2001 | Role-Playing | Sony Computer Entertainment | 2.91 | 2.07 | 2.73 | 0.33 | 8.05 |
| 87 | 88 | Final Fantasy VIII | PS | 1999 | Role-Playing | SquareSoft | 2.28 | 1.72 | 3.63 | 0.23 | 7.86 |
| 88 | 89 | Pokémon Platinum Version | DS | 2008 | Role-Playing | Nintendo | 2.82 | 1.78 | 2.69 | 0.55 | 7.84 |
sns.pairplot(rollplay_data,diag_kind='kde',hue='Platform')
plt.show()
rollplay_data['Publisher'].unique()
array(['Nintendo', 'Sony Computer Entertainment', 'Bethesda Softworks',
'SquareSoft'], dtype=object)
rollplay_data[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 4 | Pokemon Red/Pokemon Blue | GB |
| 12 | Pokemon Gold/Pokemon Silver | GB |
| 20 | Pokemon Diamond/Pokemon Pearl | DS |
| 25 | Pokemon Ruby/Pokemon Sapphire | GBA |
| 26 | Pokemon Black/Pokemon White | DS |
| 30 | Pokémon Yellow: Special Pikachu Edition | GB |
| 32 | Pokemon X/Pokemon Y | 3DS |
| 49 | Pokemon Omega Ruby/Pokemon Alpha Sapphire | 3DS |
| 58 | Pokemon FireRed/Pokemon LeafGreen | GBA |
| 66 | Final Fantasy VII | PS |
| 75 | The Elder Scrolls V: Skyrim | X360 |
| 81 | Pokemon Black 2/Pokemon White 2 | DS |
| 86 | Final Fantasy X | PS2 |
| 87 | Final Fantasy VIII | PS |
| 88 | Pokémon Platinum Version | DS |
misc_data=data[data['Genre']=='Misc']
misc_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 7 | 8 | Wii Play | Wii | 2006 | Misc | Nintendo | 14.03 | 9.20 | 2.93 | 2.85 | 29.02 |
| 15 | 16 | Kinect Adventures! | X360 | 2010 | Misc | Microsoft Game Studios | 14.97 | 4.94 | 0.24 | 1.67 | 21.82 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 60 | 61 | Just Dance 3 | Wii | 2011 | Misc | Ubisoft | 6.05 | 3.15 | 0.00 | 1.07 | 10.26 |
| 68 | 69 | Just Dance 2 | Wii | 2010 | Misc | Ubisoft | 5.84 | 2.89 | 0.01 | 0.78 | 9.52 |
| 72 | 73 | Minecraft | X360 | 2013 | Misc | Microsoft Game Studios | 5.58 | 2.83 | 0.02 | 0.77 | 9.20 |
| 74 | 75 | Mario Party DS | DS | 2007 | Misc | Nintendo | 4.46 | 1.88 | 1.98 | 0.70 | 9.02 |
| 78 | 79 | Wii Party | Wii | 2010 | Misc | Nintendo | 1.79 | 3.53 | 2.49 | 0.68 | 8.49 |
| 80 | 81 | Mario Party 8 | Wii | 2007 | Misc | Nintendo | 3.81 | 2.30 | 1.58 | 0.73 | 8.42 |
sns.pairplot(misc_data,diag_kind='kde',hue='Platform')
plt.show()
misc_data['Publisher'].unique()
array(['Nintendo', 'Microsoft Game Studios', 'Ubisoft'], dtype=object)
misc_data[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 7 | Wii Play | Wii |
| 15 | Kinect Adventures! | X360 |
| 19 | Brain Age | DS |
| 60 | Just Dance 3 | Wii |
| 68 | Just Dance 2 | Wii |
| 72 | Minecraft | X360 |
| 74 | Mario Party DS | DS |
| 78 | Wii Party | Wii |
| 80 | Mario Party 8 | Wii |
puzzle_data=data[data['Genre']=="Puzzle"]
puzzle_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 5 | 6 | Tetris | GB | 1989 | Puzzle | Nintendo | 23.20 | 2.26 | 4.22 | 0.58 | 30.26 |
| 27 | 28 | Brain Age 2: More Training in Minutes a Day | DS | 2005 | Puzzle | Nintendo | 3.44 | 5.36 | 5.32 | 1.18 | 15.30 |
| 89 | 90 | Pac-Man | 2600 | 1982 | Puzzle | Atari | 7.28 | 0.45 | 0.00 | 0.08 | 7.81 |
sns.pairplot(puzzle_data,hue='Platform')
plt.show()
puzzle_data['Publisher'].unique()
array(['Nintendo', 'Atari'], dtype=object)
puzzle_data[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 5 | Tetris | GB |
| 27 | Brain Age 2: More Training in Minutes a Day | DS |
| 89 | Pac-Man | 2600 |
simulation_data=data[data['Genre']=='Simulation']
simulation_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 10 | 11 | Nintendogs | DS | 2005 | Simulation | Nintendo | 9.07 | 11.00 | 1.93 | 2.75 | 24.76 |
| 41 | 42 | Animal Crossing: Wild World | DS | 2005 | Simulation | Nintendo | 2.55 | 3.52 | 5.33 | 0.88 | 12.27 |
| 73 | 74 | Animal Crossing: New Leaf | 3DS | 2012 | Simulation | Nintendo | 2.01 | 2.32 | 4.36 | 0.41 | 9.09 |
| 83 | 84 | The Sims 3 | PC | 2009 | Simulation | Electronic Arts | 0.98 | 6.42 | 0.00 | 0.71 | 8.11 |
sns.pairplot(simulation_data,diag_kind='kde',hue='Platform')
plt.show()
simulation_data['Publisher'].unique()
array(['Nintendo', 'Electronic Arts'], dtype=object)
simulation_data[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 10 | Nintendogs | DS |
| 41 | Animal Crossing: Wild World | DS |
| 73 | Animal Crossing: New Leaf | 3DS |
| 83 | The Sims 3 | PC |
fighting_data=data[data['Genre']=='Fighting']
fighting_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 39 | 40 | Super Smash Bros. Brawl | Wii | 2008 | Fighting | Nintendo | 6.75 | 2.61 | 2.66 | 1.02 | 13.04 |
fighting_data['Publisher'].unique()
array(['Nintendo'], dtype=object)
fighting_data[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 39 | Super Smash Bros. Brawl | Wii |
adventure_data=data[data['Genre']=='Adventure']
adventure_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 50 | 51 | Super Mario Land 2: 6 Golden Coins | GB | 1992 | Adventure | Nintendo | 6.16 | 2.04 | 2.69 | 0.29 | 11.18 |
adventure_data['Publisher'].unique()
array(['Nintendo'], dtype=object)
adventure_data[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 50 | Super Mario Land 2: 6 Golden Coins | GB |
shooter_data=data[data['Genre']=='Shooter']
shooter_data
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 9 | 10 | Duck Hunt | NES | 1984 | Shooter | Nintendo | 26.93 | 0.63 | 0.28 | 0.47 | 28.31 |
| 29 | 30 | Call of Duty: Modern Warfare 3 | X360 | 2011 | Shooter | Activision | 9.03 | 4.28 | 0.13 | 1.32 | 14.76 |
| 31 | 32 | Call of Duty: Black Ops | X360 | 2010 | Shooter | Activision | 9.67 | 3.73 | 0.11 | 1.13 | 14.64 |
| 33 | 34 | Call of Duty: Black Ops 3 | PS4 | 2015 | Shooter | Activision | 5.77 | 5.81 | 0.35 | 2.31 | 14.24 |
| 34 | 35 | Call of Duty: Black Ops II | PS3 | 2012 | Shooter | Activision | 4.99 | 5.88 | 0.65 | 2.52 | 14.03 |
| 35 | 36 | Call of Duty: Black Ops II | X360 | 2012 | Shooter | Activision | 8.25 | 4.30 | 0.07 | 1.12 | 13.73 |
| 36 | 37 | Call of Duty: Modern Warfare 2 | X360 | 2009 | Shooter | Activision | 8.52 | 3.63 | 0.08 | 1.29 | 13.51 |
| 37 | 38 | Call of Duty: Modern Warfare 3 | PS3 | 2011 | Shooter | Activision | 5.54 | 5.82 | 0.49 | 1.62 | 13.46 |
| 40 | 41 | Call of Duty: Black Ops | PS3 | 2010 | Shooter | Activision | 5.98 | 4.44 | 0.48 | 1.83 | 12.73 |
| 43 | 44 | Halo 3 | X360 | 2007 | Shooter | Microsoft Game Studios | 7.97 | 2.83 | 0.13 | 1.21 | 12.14 |
| 55 | 56 | Call of Duty: Modern Warfare 2 | PS3 | 2009 | Shooter | Activision | 4.99 | 3.69 | 0.38 | 1.63 | 10.69 |
| 61 | 62 | Call of Duty: Ghosts | X360 | 2013 | Shooter | Activision | 6.72 | 2.63 | 0.04 | 0.82 | 10.21 |
| 62 | 63 | Halo: Reach | X360 | 2010 | Shooter | Microsoft Game Studios | 7.03 | 1.98 | 0.08 | 0.78 | 9.88 |
| 65 | 66 | Halo 4 | X360 | 2012 | Shooter | Microsoft Game Studios | 6.63 | 2.36 | 0.04 | 0.73 | 9.76 |
| 67 | 68 | Call of Duty: Ghosts | PS3 | 2013 | Shooter | Activision | 4.09 | 3.73 | 0.38 | 1.38 | 9.59 |
| 70 | 71 | Call of Duty 4: Modern Warfare | X360 | 2007 | Shooter | Activision | 5.91 | 2.38 | 0.13 | 0.90 | 9.32 |
| 79 | 80 | Halo 2 | XB | 2004 | Shooter | Microsoft Game Studios | 6.82 | 1.53 | 0.05 | 0.08 | 8.49 |
| 84 | 85 | GoldenEye 007 | N64 | 1997 | Shooter | Nintendo | 5.80 | 2.01 | 0.13 | 0.15 | 8.09 |
| 92 | 93 | Star Wars Battlefront (2015) | PS4 | 2015 | Shooter | Electronic Arts | 2.93 | 3.29 | 0.22 | 1.23 | 7.67 |
| 93 | 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
sns.pairplot(shooter_data,diag_kind='kde',hue='Platform')
plt.show()
shooter_data['Publisher'].unique()
array(['Nintendo', 'Activision', 'Microsoft Game Studios',
'Electronic Arts'], dtype=object)
shooter_data[['Name','Platform']]
| Name | Platform | |
|---|---|---|
| 9 | Duck Hunt | NES |
| 29 | Call of Duty: Modern Warfare 3 | X360 |
| 31 | Call of Duty: Black Ops | X360 |
| 33 | Call of Duty: Black Ops 3 | PS4 |
| 34 | Call of Duty: Black Ops II | PS3 |
| 35 | Call of Duty: Black Ops II | X360 |
| 36 | Call of Duty: Modern Warfare 2 | X360 |
| 37 | Call of Duty: Modern Warfare 3 | PS3 |
| 40 | Call of Duty: Black Ops | PS3 |
| 43 | Halo 3 | X360 |
| 55 | Call of Duty: Modern Warfare 2 | PS3 |
| 61 | Call of Duty: Ghosts | X360 |
| 62 | Halo: Reach | X360 |
| 65 | Halo 4 | X360 |
| 67 | Call of Duty: Ghosts | PS3 |
| 70 | Call of Duty 4: Modern Warfare | X360 |
| 79 | Halo 2 | XB |
| 84 | GoldenEye 007 | N64 |
| 92 | Star Wars Battlefront (2015) | PS4 |
| 93 | Call of Duty: Advanced Warfare | PS4 |
g1=actiondata['Global_Sales'].sum().round()
g2=sportsdata['Global_Sales'].sum().round()
g3=racingdata['Global_Sales'].sum().round()
g4=platform_data['Global_Sales'].sum().round()
g5=rollplay_data['Global_Sales'].sum().round()
g6=misc_data['Global_Sales'].sum().round()
g7=puzzle_data['Global_Sales'].sum().round()
g8=simulation_data['Global_Sales'].sum().round()
g9=fighting_data['Global_Sales'].sum().round()
g10=adventure_data['Global_Sales'].sum().round()
g11=shooter_data['Global_Sales'].sum().round()
games=[g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11]
gnames=['Action','Sports','Racing','Platform','Role-Playing','Misc', 'Puzzle',
'Simulation','Fighting', 'Adventure','Shooter']
plt.figure(figsize=(12,8))
plt.plot(gnames,games,marker='o',color='g')
plt.title("Global Sales by Genres",fontsize=15)
plt.show()
sns.kdeplot(data['Global_Sales'])
plt.show()
sns.kdeplot(data['EU_Sales'],color='green',shade=True)
plt.show()
sns.pairplot(data)
plt.show()
sns.pairplot(data,diag_kind='kde')
plt.show()
plt.figure(figsize=(7,7))
sns.violinplot(data.Global_Sales)
plt.show()
a2=data.sort_values('Name').head(10)
a2
| Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 73 | 74 | Animal Crossing: New Leaf | 3DS | 2012 | Simulation | Nintendo | 2.01 | 2.32 | 4.36 | 0.41 | 9.09 |
| 41 | 42 | Animal Crossing: Wild World | DS | 2005 | Simulation | Nintendo | 2.55 | 3.52 | 5.33 | 0.88 | 12.27 |
| 19 | 20 | Brain Age | DS | 2005 | Misc | Nintendo | 4.75 | 9.26 | 4.16 | 2.05 | 20.22 |
| 27 | 28 | Brain Age 2: More Training in Minutes a Day | DS | 2005 | Puzzle | Nintendo | 3.44 | 5.36 | 5.32 | 1.18 | 15.30 |
| 70 | 71 | Call of Duty 4: Modern Warfare | X360 | 2007 | Shooter | Activision | 5.91 | 2.38 | 0.13 | 0.90 | 9.32 |
| 93 | 94 | Call of Duty: Advanced Warfare | PS4 | 2014 | Shooter | Activision | 2.80 | 3.30 | 0.14 | 1.37 | 7.60 |
| 31 | 32 | Call of Duty: Black Ops | X360 | 2010 | Shooter | Activision | 9.67 | 3.73 | 0.11 | 1.13 | 14.64 |
| 40 | 41 | Call of Duty: Black Ops | PS3 | 2010 | Shooter | Activision | 5.98 | 4.44 | 0.48 | 1.83 | 12.73 |
| 33 | 34 | Call of Duty: Black Ops 3 | PS4 | 2015 | Shooter | Activision | 5.77 | 5.81 | 0.35 | 2.31 | 14.24 |
| 34 | 35 | Call of Duty: Black Ops II | PS3 | 2012 | Shooter | Activision | 4.99 | 5.88 | 0.65 | 2.52 | 14.03 |
plt.figure(figsize=(15,7))
sns.violinplot(x='Name',y='Global_Sales',data=a2)
plt.xticks(rotation=90)
plt.show()
plt.figure(figsize=(15,7))
sns.violinplot(x="Name",y='EU_Sales',hue='Year',data=a2)
plt.xticks(rotation=90)
plt.show()
sns.swarmplot(data['NA_Sales'])
plt.show()
sns.swarmplot(x='Name',y='NA_Sales',data=a2)
plt.xticks(rotation=90)
plt.show()
sns.swarmplot(x='Name',y='NA_Sales',hue='Year',data=a2)
plt.xticks(rotation=90)
plt.show()
sns.boxplot(data['Global_Sales'])
plt.show()
sns.boxplot(y=data['Global_Sales'])
plt.show()
plt.figure(figsize=(15,7))
sns.boxplot(x='Name',y='EU_Sales',hue='Year',width=0.7,data=a2)
plt.xticks(rotation=90)
plt.show()
sns.kdeplot(data_nintendo['Global_Sales'],color='magenta',shade=True)
plt.show()
sns.pairplot(data_nintendo,diag_kind='kde',hue='Platform')
plt.show()
data.corr()
| Rank | Year | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | |
|---|---|---|---|---|---|---|---|
| Rank | 1.000000 | 0.127289 | -0.657309 | -0.537946 | -0.462587 | -0.399986 | -0.739582 |
| Year | 0.127289 | 1.000000 | -0.327936 | 0.192512 | -0.336856 | 0.211917 | -0.163147 |
| NA_Sales | -0.657309 | -0.327936 | 1.000000 | 0.564505 | 0.248103 | 0.355117 | 0.901666 |
| EU_Sales | -0.537946 | 0.192512 | 0.564505 | 1.000000 | 0.252680 | 0.498915 | 0.819937 |
| JP_Sales | -0.462587 | -0.336856 | 0.248103 | 0.252680 | 1.000000 | -0.053579 | 0.434380 |
| Other_Sales | -0.399986 | 0.211917 | 0.355117 | 0.498915 | -0.053579 | 1.000000 | 0.534322 |
| Global_Sales | -0.739582 | -0.163147 | 0.901666 | 0.819937 | 0.434380 | 0.534322 | 1.000000 |
sns.heatmap(data.corr())
plt.show()
sns.heatmap(data.corr(), cmap='RdBu')
plt.show()
sns.heatmap(data.corr(), cmap='RdBu', vmin=-1, vmax=1)
plt.show()
sns.heatmap(data.corr(),center=0)
plt.show()
sns.heatmap(data.corr(), cmap='RdBu', annot=True)
plt.show()
sns.heatmap(data.corr(), cmap='RdBu', annot=True, fmt='.1f')
plt.show()
sns.heatmap(data.corr(), cmap='RdBu', linewidth=1,linecolor='black')
plt.show()
sns.heatmap(data.corr(), cmap='RdBu',linewidth=1,square=True)
plt.show()
sns.displot(data.EU_Sales)
plt.show()
sns.distplot(data.EU_Sales)
plt.show()
sns.set_style("whitegrid")
sns.distplot(data.EU_Sales,color='green')
plt.show()
plt.figure(figsize=(8,5))
sns.distplot(data.EU_Sales,
bins=20,
kde_kws={'lw':8,'color':'xkcd:bluish green'},
hist_kws={'alpha':0.3,'color':'grey'})
plt.xlabel('EU_Sales',fontsize=16,labelpad=15)
plt.yticks([])
plt.show()
sns.distplot(data.Global_Sales,hist=False)
plt.show()
sns.distplot(data.Global_Sales,kde=False)
plt.show()